Medical Imaging Interaction Toolkit  2018.4.99-3e3f1a6e
Medical Imaging Interaction Toolkit
mitk::DICOMSortCriterion Class Referenceabstract

A tag based sorting criterion for use in DICOMTagBasedSorter. More...

#include <mitkDICOMSortCriterion.h>

Inheritance diagram for mitk::DICOMSortCriterion:
Collaboration diagram for mitk::DICOMSortCriterion:

Public Member Functions

 mitkClassMacroItkParent (DICOMSortCriterion, itk::LightObject)
 
DICOMTagList GetAllTagsOfInterest () const
 Tags used for comparison (includes seconary criteria). More...
 
virtual DICOMTagList GetTagsOfInterest () const =0
 Tags used for comparison. More...
 
virtual bool IsLeftBeforeRight (const mitk::DICOMDatasetAccess *left, const mitk::DICOMDatasetAccess *right) const =0
 Answer the sorting question. More...
 
virtual double NumericDistance (const mitk::DICOMDatasetAccess *from, const mitk::DICOMDatasetAccess *to) const =0
 Calculate a distance between two datasets. This ansers the question of consecutive datasets. More...
 
DICOMSortCriterion::ConstPointer GetSecondaryCriterion () const
 The fallback criterion. More...
 
virtual void Print (std::ostream &os) const =0
 brief describe this class in given stream. More...
 
virtual bool operator== (const DICOMSortCriterion &other) const =0
 

Protected Member Functions

 DICOMSortCriterion (DICOMSortCriterion::Pointer secondaryCriterion)
 
 ~DICOMSortCriterion () override
 
bool NextLevelIsLeftBeforeRight (const mitk::DICOMDatasetAccess *left, const mitk::DICOMDatasetAccess *right) const
 
 DICOMSortCriterion (const DICOMSortCriterion &other)
 
DICOMSortCriterionoperator= (const DICOMSortCriterion &other)
 

Protected Attributes

DICOMSortCriterion::Pointer m_SecondaryCriterion
 

Detailed Description

A tag based sorting criterion for use in DICOMTagBasedSorter.

This class is used within std::sort (see DICOMTagBasedSorter::Sort()) and has to answer a simple question by implementing IsLeftBeforeRight(). Each time IsLeftBeforeRight() is called, the method should return whether the left dataset should be sorted before the right dataset.

Because there are identical tags values quite oftenly, a DICOMSortCriterion will always hold a secondary DICOMSortCriterion. In cases of equal tag values, the decision is refered to the secondary criterion.

Definition at line 37 of file mitkDICOMSortCriterion.h.

Constructor & Destructor Documentation

◆ DICOMSortCriterion() [1/2]

mitk::DICOMSortCriterion::DICOMSortCriterion ( DICOMSortCriterion::Pointer  secondaryCriterion)
protected

Definition at line 16 of file mitkDICOMSortCriterion.cpp.

References ~DICOMSortCriterion().

Referenced by ~DICOMSortCriterion().

◆ ~DICOMSortCriterion()

mitk::DICOMSortCriterion::~DICOMSortCriterion ( )
overrideprotected

Definition at line 23 of file mitkDICOMSortCriterion.cpp.

References DICOMSortCriterion().

Referenced by DICOMSortCriterion().

◆ DICOMSortCriterion() [2/2]

mitk::DICOMSortCriterion::DICOMSortCriterion ( const DICOMSortCriterion other)
explicitprotected

Definition at line 28 of file mitkDICOMSortCriterion.cpp.

References operator=().

Member Function Documentation

◆ GetAllTagsOfInterest()

mitk::DICOMTagList mitk::DICOMSortCriterion::GetAllTagsOfInterest ( ) const

Tags used for comparison (includes seconary criteria).

Definition at line 54 of file mitkDICOMSortCriterion.cpp.

References GetTagsOfInterest(), m_SecondaryCriterion, and NextLevelIsLeftBeforeRight().

Referenced by GetSecondaryCriterion().

◆ GetSecondaryCriterion()

mitk::DICOMSortCriterion::ConstPointer mitk::DICOMSortCriterion::GetSecondaryCriterion ( ) const

The fallback criterion.

Definition at line 47 of file mitkDICOMSortCriterion.cpp.

References GetAllTagsOfInterest(), and m_SecondaryCriterion.

Referenced by operator=().

◆ GetTagsOfInterest()

virtual DICOMTagList mitk::DICOMSortCriterion::GetTagsOfInterest ( ) const
pure virtual

Tags used for comparison.

Implemented in mitk::DICOMSortByTag, and mitk::SortByImagePositionPatient.

Referenced by GetAllTagsOfInterest().

◆ IsLeftBeforeRight()

virtual bool mitk::DICOMSortCriterion::IsLeftBeforeRight ( const mitk::DICOMDatasetAccess left,
const mitk::DICOMDatasetAccess right 
) const
pure virtual

Answer the sorting question.

Implemented in mitk::DICOMSortByTag, and mitk::SortByImagePositionPatient.

◆ mitkClassMacroItkParent()

mitk::DICOMSortCriterion::mitkClassMacroItkParent ( DICOMSortCriterion  ,
itk::LightObject   
)

◆ NextLevelIsLeftBeforeRight()

bool mitk::DICOMSortCriterion::NextLevelIsLeftBeforeRight ( const mitk::DICOMDatasetAccess left,
const mitk::DICOMDatasetAccess right 
) const
protected

◆ NumericDistance()

virtual double mitk::DICOMSortCriterion::NumericDistance ( const mitk::DICOMDatasetAccess from,
const mitk::DICOMDatasetAccess to 
) const
pure virtual

Calculate a distance between two datasets. This ansers the question of consecutive datasets.

Implemented in mitk::DICOMSortByTag, and mitk::SortByImagePositionPatient.

◆ operator=()

mitk::DICOMSortCriterion & mitk::DICOMSortCriterion::operator= ( const DICOMSortCriterion other)
protected

◆ operator==()

virtual bool mitk::DICOMSortCriterion::operator== ( const DICOMSortCriterion other) const
pure virtual

◆ Print()

virtual void mitk::DICOMSortCriterion::Print ( std::ostream &  os) const
pure virtual

brief describe this class in given stream.

Implemented in mitk::DICOMSortByTag, and mitk::SortByImagePositionPatient.

Member Data Documentation

◆ m_SecondaryCriterion

DICOMSortCriterion::Pointer mitk::DICOMSortCriterion::m_SecondaryCriterion
protected

The documentation for this class was generated from the following files: