Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
mitkDICOMDatasetSorter.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkDICOMDatasetSorter_h
14 #define mitkDICOMDatasetSorter_h
15 
16 #include "itkObjectFactory.h"
17 #include "mitkCommon.h"
18 
19 #include "mitkDICOMDatasetAccess.h"
21 
22 namespace mitk
23 {
24 
41 class MITKDICOM_EXPORT DICOMDatasetSorter : public itk::LightObject
42 {
43  public:
44 
46 
51 
53  void SetInput(DICOMDatasetList filenames);
55  const DICOMDatasetList& GetInput() const;
56 
58  virtual void Sort() = 0;
59 
61  unsigned int GetNumberOfOutputs() const;
63  const DICOMDatasetList& GetOutput(unsigned int index) const;
65  DICOMDatasetList& GetOutput(unsigned int index);
66 
68 
70  virtual void PrintConfiguration(std::ostream& os, const std::string& indent = "") const = 0;
71 
72  virtual bool operator==(const DICOMDatasetSorter& other) const = 0;
73 
74  protected:
75 
77  ~DICOMDatasetSorter() override;
78 
81 
82  void ClearOutputs();
83  void SetNumberOfOutputs(unsigned int numberOfOutputs);
84  void SetOutput(unsigned int index, const DICOMDatasetList& output, IOVolumeSplitReason::ConstPointer splitReason = nullptr);
85 
86  private:
87 
88  DICOMDatasetList m_Input;
89  std::vector< DICOMDatasetList > m_Outputs;
90  std::vector< IOVolumeSplitReason::Pointer > m_SplitReasons;
91 };
92 
93 }
94 
95 #endif
#define MITKDICOM_EXPORT
The sorting/splitting building-block of DICOMITKSeriesGDCMReader.
DICOMDatasetSorter & operator=(const DICOMDatasetSorter &other)
unsigned int GetNumberOfOutputs() const
Output of the sorting process.
void SetOutput(unsigned int index, const DICOMDatasetList &output, IOVolumeSplitReason::ConstPointer splitReason=nullptr)
IOVolumeSplitReason::ConstPointer GetSplitReason(unsigned int index) const
virtual void PrintConfiguration(std::ostream &os, const std::string &indent="") const =0
Print configuration details into stream.
virtual bool operator==(const DICOMDatasetSorter &other) const =0
const DICOMDatasetList & GetOutput(unsigned int index) const
Output of the sorting process.
void SetInput(DICOMDatasetList filenames)
Input for sorting.
~DICOMDatasetSorter() override
DICOMDatasetSorter(const DICOMDatasetSorter &other)
virtual DICOMTagList GetTagsOfInterest()=0
Return the tags of interest (to facilitate scanning)
virtual void Sort()=0
Sort input datasets into one or multiple outputs.
mitkClassMacroItkParent(DICOMDatasetSorter, itk::LightObject)
DICOMDatasetList & GetOutput(unsigned int index)
Output of the sorting process.
void SetNumberOfOutputs(unsigned int numberOfOutputs)
const DICOMDatasetList & GetInput() const
Input for sorting.
std::shared_ptr< const IOVolumeSplitReason > ConstPointer
Find image slices visible on a given plane.
std::vector< DICOMDatasetAccess * > DICOMDatasetList
std::vector< DICOMTag > DICOMTagList
Definition: mitkDICOMTag.h:59