Medical Imaging Interaction Toolkit  2023.12.99-63768887
Medical Imaging Interaction Toolkit
mitk::ClassicDICOMSeriesReader Class Reference

Sorting and grouping like mitk::DicomSeriesReader until 2013. More...

#include <mitkClassicDICOMSeriesReader.h>

Inheritance diagram for mitk::ClassicDICOMSeriesReader:
Collaboration diagram for mitk::ClassicDICOMSeriesReader:

Public Member Functions

 mitkClassMacro (ClassicDICOMSeriesReader, DICOMITKSeriesGDCMReader)
 
 mitkCloneMacro (ClassicDICOMSeriesReader)
 
bool operator== (const DICOMFileReader &other) const override
 
- Public Member Functions inherited from mitk::ThreeDnTDICOMSeriesReader
 mitkClassMacro (ThreeDnTDICOMSeriesReader, DICOMITKSeriesGDCMReader)
 
 mitkCloneMacro (ThreeDnTDICOMSeriesReader)
 
 mitkNewMacro1Param (ThreeDnTDICOMSeriesReader, unsigned int)
 
void SetGroup3DandT (bool on)
 Control whether 3D+t grouping shall actually be attempted. More...
 
bool GetGroup3DandT () const
 
virtual void OnlyCondenseSameSeriesOn ()
 
virtual void OnlyCondenseSameSeriesOff ()
 
virtual void SetOnlyCondenseSameSeries (bool _arg)
 
virtual bool GetOnlyCondenseSameSeries () const
 
bool LoadImages () override
 Load via multiple calls to itk::ImageSeriesReader. More...
 
bool operator== (const DICOMFileReader &other) const override
 
- Public Member Functions inherited from mitk::DICOMITKSeriesGDCMReader
 mitkClassMacro (DICOMITKSeriesGDCMReader, DICOMFileReader)
 
 mitkCloneMacro (DICOMITKSeriesGDCMReader)
 
 mitkNewMacro1Param (DICOMITKSeriesGDCMReader, unsigned int)
 
 mitkNewMacro2Param (DICOMITKSeriesGDCMReader, unsigned int, bool)
 
void AnalyzeInputFiles () override
 Runs the sorting / splitting process described in Loading strategy. Method required by DICOMFileReader. More...
 
bool CanHandleFile (const std::string &filename) override
 Indicate whether this reader can handle given file. More...
 
virtual void AddSortingElement (DICOMDatasetSorter *sorter, bool atFront=false)
 Add an element to the sorting procedure described in Loading strategy. More...
 
ConstSorterList GetFreelyConfiguredSortingElements () const
 
void SetFixTiltByShearing (bool on)
 Controls whether to "fix" tilted acquisitions by shearing the output (see Gantry tilt handling). More...
 
bool GetFixTiltByShearing () const
 
void SetAcceptTwoSlicesGroups (bool accept) const
 Controls whether groups of only two images are accepted when ensuring consecutive slices via EquiDistantBlocksSorter. More...
 
bool GetAcceptTwoSlicesGroups () const
 
void SetToleratedOriginOffsetToAdaptive (double fractionOfInterSliceDistanct=0.3) const
 See Forced Configuration. More...
 
void SetToleratedOriginOffset (double millimeters=0.005) const
 See Forced Configuration. More...
 
void SetSimpleVolumeReading (bool read)
 Ignore all dicom tags that are non-essential for simple 3D volume import. More...
 
bool GetSimpleVolumeReading ()
 Ignore all dicom tags that are non-essential for simple 3D volume import. More...
 
double GetToleratedOriginError () const
 
bool IsToleratedOriginOffsetAbsolute () const
 
double GetDecimalPlacesForOrientation () const
 
DICOMTagPathList GetTagsOfInterest () const override
 
- Public Member Functions inherited from mitk::DICOMFileReader
 mitkClassMacroItkParent (DICOMFileReader, itk::Object)
 
void SetInputFiles (const StringList &filenames)
 This input files. More...
 
const StringListGetInputFiles () const
 This input files. More...
 
unsigned int GetNumberOfOutputs () const
 Number of outputs, only meaningful after calling AnalyzeInputFiles() More...
 
const DICOMImageBlockDescriptorGetOutput (unsigned int index) const
 Individual outputs, only meaningful after calling AnalyzeInputFiles(). More...
 
void SetConfigurationLabel (const std::string &)
 Short label/name to describe this reader. More...
 
std::string GetConfigurationLabel () const
 Short label/name to describe this reader. More...
 
void SetConfigurationDescription (const std::string &)
 One-sentence description of the reader's loading "strategy". More...
 
std::string GetConfigurationDescription () const
 One-sentence description of the reader's loading "strategy". More...
 
void PrintConfiguration (std::ostream &os) const
 Print configuration description to given stream, for human reader. More...
 
void PrintOutputs (std::ostream &os, bool filenameDetails=false) const
 Print output description to given stream, for human reader. More...
 
virtual void SetAdditionalTagsOfInterest (const AdditionalTagsMapType &tagList)
 Set a list of DICOMTagPaths that specify all DICOM-Tags that will be copied into the property of the mitk::Image. More...
 
virtual void SetTagLookupTableToPropertyFunctor (mitk::DICOMImageBlockDescriptor::TagLookupTableToPropertyFunctor functor)
 Set a functor that defines how the slice-specific tag-values are stored in a Property. More...
 

Static Public Member Functions

static Pointer New ()
 
- Static Public Member Functions inherited from mitk::ThreeDnTDICOMSeriesReader
static Pointer New ()
 
static bool GetDefaultGroup3DandT ()
 
static bool GetDefaultOnlyCondenseSameSeries ()
 
- Static Public Member Functions inherited from mitk::DICOMITKSeriesGDCMReader
static Pointer New ()
 
static int GetDefaultDecimalPlacesForOrientation ()
 
static bool GetDefaultSimpleVolumeImport ()
 
static bool GetDefaultFixTiltByShearing ()
 
- Static Public Member Functions inherited from mitk::DICOMFileReader
static bool IsDICOM (const std::string &filename)
 Test whether a file is DICOM at all. More...
 

Protected Member Functions

 ClassicDICOMSeriesReader ()
 
 ~ClassicDICOMSeriesReader () override
 
 ClassicDICOMSeriesReader (const ClassicDICOMSeriesReader &other)
 
ClassicDICOMSeriesReaderoperator= (const ClassicDICOMSeriesReader &other)
 
- Protected Member Functions inherited from mitk::ThreeDnTDICOMSeriesReader
 ThreeDnTDICOMSeriesReader (unsigned int decimalPlacesForOrientation=Superclass::m_DefaultDecimalPlacesForOrientation)
 
 ~ThreeDnTDICOMSeriesReader () override
 
 ThreeDnTDICOMSeriesReader (const ThreeDnTDICOMSeriesReader &other)
 
ThreeDnTDICOMSeriesReaderoperator= (const ThreeDnTDICOMSeriesReader &other)
 
SortingBlockList Condense3DBlocks (SortingBlockList &) override
 Analyze the groups produced by DICOMITKSeriesGDCMReader for 3D+t properties. This method tests whether some blocks are at the same spatial position and groups them into single blocks. More...
 
bool LoadMitkImageForImageBlockDescriptor (DICOMImageBlockDescriptor &block) const override
 
- Protected Member Functions inherited from mitk::DICOMITKSeriesGDCMReader
void InternalPrintConfiguration (std::ostream &os) const override
 Configuration description for human reader, to be implemented by sub-classes. More...
 
void PushLocale () const
 Remember current locale on stack, activate "C" locale. "C" locale is required for correct parsing of numbers by itk::ImageSeriesReader. More...
 
void PopLocale () const
 Activate last remembered locale from locale stack "C" locale is required for correct parsing of numbers by itk::ImageSeriesReader. More...
 
 DICOMITKSeriesGDCMReader (unsigned int decimalPlacesForOrientation=m_DefaultDecimalPlacesForOrientation, bool simpleVolumeImport=m_DefaultSimpleVolumeImport)
 
 ~DICOMITKSeriesGDCMReader () override
 
 DICOMITKSeriesGDCMReader (const DICOMITKSeriesGDCMReader &other)
 
DICOMITKSeriesGDCMReaderoperator= (const DICOMITKSeriesGDCMReader &other)
 
virtual DICOMTagCache::Pointer GetTagCache () const
 
void SetTagCache (const DICOMTagCache::Pointer &) override
 A way to provide external knowledge about files and tag values is appreciated. More...
 
virtual bool LoadMitkImageForOutput (unsigned int o)
 Loads the mitk::Image by means of an itk::ImageSeriesReader. More...
 
- Protected Member Functions inherited from mitk::DICOMFileReader
 DICOMFileReader ()
 
 ~DICOMFileReader () override
 
 DICOMFileReader (const DICOMFileReader &other)
 
DICOMFileReaderoperator= (const DICOMFileReader &other)
 
void ClearOutputs ()
 
void SetNumberOfOutputs (unsigned int numberOfOutputs)
 
void SetOutput (unsigned int index, const DICOMImageBlockDescriptor &output)
 
DICOMImageBlockDescriptorInternalGetOutput (unsigned int index)
 non-const access to the DICOMImageBlockDescriptor More...
 
virtual AdditionalTagsMapType GetAdditionalTagsOfInterest () const
 
mitk::DICOMImageBlockDescriptor::TagLookupTableToPropertyFunctor GetTagLookupTableToPropertyFunctor () const
 

Additional Inherited Members

- Public Types inherited from mitk::DICOMFileReader
typedef DICOMImageBlockDescriptor::AdditionalTagsMapType AdditionalTagsMapType
 
- Public Attributes inherited from mitk::DICOMITKSeriesGDCMReader
const typedef std::list< DICOMDatasetSorter::ConstPointer > ConstSorterList
 
- Protected Types inherited from mitk::DICOMITKSeriesGDCMReader
typedef std::vector< DICOMDatasetAccessingImageFrameListSortingBlockList
 
- Static Protected Member Functions inherited from mitk::DICOMITKSeriesGDCMReader
static std::string GetActiveLocale ()
 Return active C locale. More...
 
static SortingBlockList InternalExecuteSortingStep (unsigned int sortingStepIndex, const DICOMDatasetSorter::Pointer &sorter, const SortingBlockList &input)
 Sorting step as described in Loading strategy. More...
 
static ReaderImplementationLevel GetReaderImplementationLevel (const std::string sopClassUID)
 Describe this reader's confidence for given SOP class UID. More...
 
- Protected Attributes inherited from mitk::ThreeDnTDICOMSeriesReader
bool m_Group3DandT
 
bool m_OnlyCondenseSameSeries
 
- Protected Attributes inherited from mitk::DICOMITKSeriesGDCMReader
bool m_FixTiltByShearing
 
bool m_SimpleVolumeReading
 
mitk::EquiDistantBlocksSorter::Pointer m_EquiDistantBlocksSorter
 
mitk::NormalDirectionConsistencySorter::Pointer m_NormalDirectionConsistencySorter
 
- Static Protected Attributes inherited from mitk::ThreeDnTDICOMSeriesReader
const static bool m_DefaultGroup3DandT
 
const static bool m_DefaultOnlyCondenseSameSeries
 
- Static Protected Attributes inherited from mitk::DICOMITKSeriesGDCMReader
const static int m_DefaultDecimalPlacesForOrientation
 
const static bool m_DefaultSimpleVolumeImport
 
const static bool m_DefaultFixTiltByShearing
 

Detailed Description

Sorting and grouping like mitk::DicomSeriesReader until 2013.

This class implements the same functionality as the legacy class DicomSeriesReader, except that it is 75 lines instead of 2500 lines.

Warning
Since the old class is known to have problems with some series, it is advised to use a good configuration of DICOMITKSeriesGDCMReader, which can be obtained by using DICOMFileReaderSelector.

The following text documents the actual sorting logic of this reader.

The class groups datasets that have different values in any of the following tags:

  • (0028,0010) Number of Rows
  • (0028,0011) Number of Columns
  • (0028,0030) Pixel Spacing
  • (0018,1164) Imager Pixel Spacing
  • (0020,0037) Image Orientation (Patient)
  • (0018,0050) Slice Thickness
  • (0028,0008) Number of Frames
  • (0020,000e) Series Instance UID

Within each of the groups, datasets are sorted by the value of the following tags (primary sorting first):

  • (0020,0032) Image Position (Patient) (distance from zero along normal of (0020,0037) Image Orientation (Patient))
  • (0020,0012) Acquisition Number
  • (0008,0032) Acquisition Time
  • (0018,1060) Trigger Time
  • (0008,0018) SOP Instance UID (last resort, not really meaningful but decides clearly)

If the series was acquired using a tilted gantry, this will be "fixed" by applying a shear transformation.

If multiple images occupy the same position in space, it is assumed that this indicated a 3D+t image.

Definition at line 57 of file mitkClassicDICOMSeriesReader.h.

Constructor & Destructor Documentation

◆ ClassicDICOMSeriesReader() [1/2]

mitk::ClassicDICOMSeriesReader::ClassicDICOMSeriesReader ( )
protected

◆ ~ClassicDICOMSeriesReader()

mitk::ClassicDICOMSeriesReader::~ClassicDICOMSeriesReader ( )
overrideprotected

◆ ClassicDICOMSeriesReader() [2/2]

mitk::ClassicDICOMSeriesReader::ClassicDICOMSeriesReader ( const ClassicDICOMSeriesReader other)
protected

Member Function Documentation

◆ mitkClassMacro()

mitk::ClassicDICOMSeriesReader::mitkClassMacro ( ClassicDICOMSeriesReader  ,
DICOMITKSeriesGDCMReader   
)

◆ mitkCloneMacro()

mitk::ClassicDICOMSeriesReader::mitkCloneMacro ( ClassicDICOMSeriesReader  )

◆ New()

static Pointer mitk::ClassicDICOMSeriesReader::New ( )
static

◆ operator=()

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

◆ operator==()

bool mitk::ClassicDICOMSeriesReader::operator== ( const DICOMFileReader other) const
overridevirtual

Implements mitk::DICOMFileReader.


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