Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
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
mitkNewMacro2Param
#define mitkNewMacro2Param(classname, typea, typeb)
Definition: mitkCommon.h:81
mitk::DICOMDatasetAccess
Interface to datasets that is presented to sorting classes such as DICOMDatasetSorter.
Definition: mitkDICOMDatasetAccess.h:45
mitkNewMacro1Param
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:68
mitk::DICOMTag
Representation of a DICOM tag.
Definition: mitkDICOMTag.h:32
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::DICOMTagList
std::vector< DICOMTag > DICOMTagList
Definition: mitkDICOMTag.h:59
mitk::operator==
MITKCORE_EXPORT bool operator==(const InteractionEvent &a, const InteractionEvent &b)
mitk::DICOMSortCriterion
A tag based sorting criterion for use in DICOMTagBasedSorter.
Definition: mitkDICOMSortCriterion.h:37
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
MITKDICOM_EXPORT
#define MITKDICOM_EXPORT
Definition: MitkDICOMExports.h:15
mitkDICOMSortCriterion.h
mitk::DICOMSortByTag
Compare two datasets by the value of a single tag (for use in DICOMTagBasedSorter).
Definition: mitkDICOMSortByTag.h:33