Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::NormalDirectionConsistencySorter Class Reference

Makes sure that the order of files is along the image plane normals. More...

#include <mitkNormalDirectionConsistencySorter.h>

Inheritance diagram for mitk::NormalDirectionConsistencySorter:
Collaboration diagram for mitk::NormalDirectionConsistencySorter:

Public Member Functions

 mitkClassMacro (NormalDirectionConsistencySorter, DICOMDatasetSorter)
 
DICOMTagList GetTagsOfInterest () override
 Return the tags of interest (to facilitate scanning) More...
 
void Sort () override
 See class description. More...
 
GantryTiltInformation GetTiltInformation () const
 See class description and DICOMITKSeriesGDCMReader. More...
 
void PrintConfiguration (std::ostream &os, const std::string &indent="") const override
 Print configuration details into stream. More...
 
bool operator== (const DICOMDatasetSorter &other) const override
 Equality comparison operator. More...
 
- Public Member Functions inherited from mitk::DICOMDatasetSorter
 mitkClassMacroItkParent (DICOMDatasetSorter, itk::LightObject)
 
void SetInput (DICOMDatasetList filenames)
 Set the input datasets for sorting. More...
 
const DICOMDatasetList & GetInput () const
 Get the input datasets. More...
 
unsigned int GetNumberOfOutputs () const
 Get the number of output groups after sorting. More...
 
const DICOMDatasetList & GetOutput (unsigned int index) const
 Get a specific output group (const). More...
 
DICOMDatasetList & GetOutput (unsigned int index)
 Get a specific output group (non-const). More...
 
IOVolumeSplitReason::ConstPointer GetSplitReason (unsigned int index) const
 Get the split reason for a specific output group. More...
 

Static Public Member Functions

static Pointer New ()
 

Protected Member Functions

 mitkCloneMacro (NormalDirectionConsistencySorter)
 
 NormalDirectionConsistencySorter ()
 
 ~NormalDirectionConsistencySorter () override
 
 NormalDirectionConsistencySorter (const NormalDirectionConsistencySorter &other)
 
NormalDirectionConsistencySorter & operator= (const NormalDirectionConsistencySorter &other)
 
- Protected Member Functions inherited from mitk::DICOMDatasetSorter
 DICOMDatasetSorter ()
 
 ~DICOMDatasetSorter () override
 
 DICOMDatasetSorter (const DICOMDatasetSorter &other)
 
DICOMDatasetSorter & operator= (const DICOMDatasetSorter &other)
 
void ClearOutputs ()
 
void SetNumberOfOutputs (unsigned int numberOfOutputs)
 
void SetOutput (unsigned int index, const DICOMDatasetList &output, IOVolumeSplitReason::ConstPointer splitReason=nullptr)
 

Protected Attributes

GantryTiltInformation m_TiltInfo
 

Detailed Description

Makes sure that the order of files is along the image plane normals.

When loading with ImageSeriesReader and initializing an mitk::Image with the result we need to make sure that the order of inputs for the ImageSeriesReader is along the normal of the images. I.e. The direction of the normal needs to be the same direction as the vector from the first to the last image origin.

Since this class is used as a last sorting step before loading, it will also calculate (and return) an updated GantryTiltInformation object.

Note
This class might be a workaround for another bug in MITK, but until this issue is completely understood, the workaround fixes the problem of images that appear upside-down.

Definition at line 38 of file mitkNormalDirectionConsistencySorter.h.

Constructor & Destructor Documentation

◆ NormalDirectionConsistencySorter() [1/2]

mitk::NormalDirectionConsistencySorter::NormalDirectionConsistencySorter ( )
protected

◆ ~NormalDirectionConsistencySorter()

mitk::NormalDirectionConsistencySorter::~NormalDirectionConsistencySorter ( )
overrideprotected

◆ NormalDirectionConsistencySorter() [2/2]

mitk::NormalDirectionConsistencySorter::NormalDirectionConsistencySorter ( const NormalDirectionConsistencySorter &  other)
protected

Member Function Documentation

◆ GetTagsOfInterest()

DICOMTagList mitk::NormalDirectionConsistencySorter::GetTagsOfInterest ( )
overridevirtual

Return the tags of interest (to facilitate scanning)

Implements mitk::DICOMDatasetSorter.

◆ GetTiltInformation()

GantryTiltInformation mitk::NormalDirectionConsistencySorter::GetTiltInformation ( ) const

See class description and DICOMITKSeriesGDCMReader.

◆ mitkClassMacro()

mitk::NormalDirectionConsistencySorter::mitkClassMacro ( NormalDirectionConsistencySorter  ,
DICOMDatasetSorter   
)

◆ mitkCloneMacro()

mitk::NormalDirectionConsistencySorter::mitkCloneMacro ( NormalDirectionConsistencySorter  )
protected

◆ New()

static Pointer mitk::NormalDirectionConsistencySorter::New ( )
static

◆ operator=()

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

◆ operator==()

bool mitk::NormalDirectionConsistencySorter::operator== ( const DICOMDatasetSorter &  other) const
overridevirtual

Equality comparison operator.

Parameters
[in]otherThe sorter to compare with.
Returns
true if the sorters have identical configurations.

Implements mitk::DICOMDatasetSorter.

◆ PrintConfiguration()

void mitk::NormalDirectionConsistencySorter::PrintConfiguration ( std::ostream &  os,
const std::string &  indent = "" 
) const
overridevirtual

Print configuration details into stream.

Parameters
[in,out]osThe output stream to print to.
[in]indentIndentation prefix for each line.

Implements mitk::DICOMDatasetSorter.

◆ Sort()

void mitk::NormalDirectionConsistencySorter::Sort ( )
overridevirtual

See class description.

Implements mitk::DICOMDatasetSorter.

Member Data Documentation

◆ m_TiltInfo

GantryTiltInformation mitk::NormalDirectionConsistencySorter::m_TiltInfo
protected

Definition at line 67 of file mitkNormalDirectionConsistencySorter.h.


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