Medical Imaging Interaction Toolkit  2018.4.99-6a3ea89d
Medical Imaging Interaction Toolkit
mitkDICOMSortByTag.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 mitkDICOMSortByTag_h
14 #define mitkDICOMSortByTag_h
15 
16 #include "mitkDICOMSortCriterion.h"
17 
18 namespace mitk
19 {
20 
34 {
35  public:
36 
39  mitkNewMacro2Param( DICOMSortByTag, const DICOMTag&, DICOMSortCriterion::Pointer );
40 
41  DICOMTagList GetTagsOfInterest() const override;
42  bool IsLeftBeforeRight(const mitk::DICOMDatasetAccess* left, const mitk::DICOMDatasetAccess* right) const override;
43 
44  double NumericDistance(const mitk::DICOMDatasetAccess* from, const mitk::DICOMDatasetAccess* to) const override;
45 
46  void Print(std::ostream& os) const override;
47 
48  bool operator==(const DICOMSortCriterion& other) const override;
49 
50  protected:
51 
52  DICOMSortByTag( const DICOMTag& tag, DICOMSortCriterion::Pointer secondaryCriterion = nullptr );
53  ~DICOMSortByTag() override;
54 
55  DICOMSortByTag(const DICOMSortByTag& other);
56  DICOMSortByTag& operator=(const DICOMSortByTag& other);
57 
58  bool StringCompare(const mitk::DICOMDatasetAccess* left, const mitk::DICOMDatasetAccess* right, const DICOMTag& tag) const;
59  bool NumericCompare(const mitk::DICOMDatasetAccess* left, const mitk::DICOMDatasetAccess* right, const DICOMTag& tag) const;
60 
61  private:
62 
63  DICOMTag m_Tag;
64 };
65 
66 }
67 
68 #endif
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:72
std::vector< DICOMTag > DICOMTagList
Definition: mitkDICOMTag.h:59
Representation of a DICOM tag.
Definition: mitkDICOMTag.h:32
#define MITKDICOMREADER_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkNewMacro2Param(classname, typea, typeb)
Definition: mitkCommon.h:85
MITKCORE_EXPORT bool operator==(const InteractionEvent &a, const InteractionEvent &b)
Interface to datasets that is presented to sorting classes such as DICOMDatasetSorter.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Compare two datasets by the value of a single tag (for use in DICOMTagBasedSorter).
A tag based sorting criterion for use in DICOMTagBasedSorter.