Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef mitkDICOMSortByTag_h
18 #define mitkDICOMSortByTag_h
19 
20 #include "mitkDICOMSortCriterion.h"
21 
22 namespace mitk
23 {
24 
38 {
39  public:
40 
44 
45  virtual DICOMTagList GetTagsOfInterest() const override;
46  virtual bool IsLeftBeforeRight(const mitk::DICOMDatasetAccess* left, const mitk::DICOMDatasetAccess* right) const override;
47 
48  virtual double NumericDistance(const mitk::DICOMDatasetAccess* from, const mitk::DICOMDatasetAccess* to) const override;
49 
50  virtual void Print(std::ostream& os) const override;
51 
52  virtual bool operator==(const DICOMSortCriterion& other) const override;
53 
54  protected:
55 
56  DICOMSortByTag( const DICOMTag& tag, DICOMSortCriterion::Pointer secondaryCriterion = nullptr );
57  virtual ~DICOMSortByTag();
58 
59  DICOMSortByTag(const DICOMSortByTag& other);
60  DICOMSortByTag& operator=(const DICOMSortByTag& other);
61 
62  bool StringCompare(const mitk::DICOMDatasetAccess* left, const mitk::DICOMDatasetAccess* right, const DICOMTag& tag) const;
63  bool NumericCompare(const mitk::DICOMDatasetAccess* left, const mitk::DICOMDatasetAccess* right, const DICOMTag& tag) const;
64 
65  private:
66 
67  DICOMTag m_Tag;
68 };
69 
70 }
71 
72 #endif
itk::SmartPointer< Self > Pointer
#define mitkNewMacro1Param(classname, type)
Definition: mitkCommon.h:76
std::vector< DICOMTag > DICOMTagList
Definition: mitkDICOMTag.h:64
Representation of a DICOM tag.
Definition: mitkDICOMTag.h:37
#define MITKDICOMREADER_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkNewMacro2Param(classname, typea, typeb)
Definition: mitkCommon.h:89
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:44
Compare two datasets by the value of a single tag (for use in DICOMTagBasedSorter).
A tag based sorting criterion for use in DICOMTagBasedSorter.