Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::DICOMImageBlockDescriptor Class Reference

Output descriptor for DICOMFileReader. More...

#include <mitkDICOMImageBlockDescriptor.h>

Public Types

typedef std::map< DICOMTagPath, std::string > AdditionalTagsMapType
 
typedef std::function< mitk::BaseProperty::Pointer(const DICOMCachedValueLookupTable &) > TagLookupTableToPropertyFunctor
 

Public Member Functions

 DICOMImageBlockDescriptor ()
 
 ~DICOMImageBlockDescriptor ()
 
 DICOMImageBlockDescriptor (const DICOMImageBlockDescriptor &other)
 
DICOMImageBlockDescriptoroperator= (const DICOMImageBlockDescriptor &other)
 
void SetImageFrameList (const DICOMImageFrameList &framelist)
 List of frames that constitute the mitk::Image (DICOMImageFrames) More...
 
const DICOMImageFrameListGetImageFrameList () const
 List of frames that constitute the mitk::Image (DICOMImageFrames) More...
 
void SetMitkImage (Image::Pointer image)
 The 3D mitk::Image that is loaded from the DICOM files of a DICOMImageFrameList. More...
 
Image::Pointer GetMitkImage () const
 the 3D mitk::Image that is loaded from the DICOM files of a DICOMImageFrameList More...
 
ReaderImplementationLevel GetReaderImplementationLevel () const
 Reader's capability to appropriately load this set of frames. More...
 
void SetReaderImplementationLevel (const ReaderImplementationLevel &level)
 Reader's capability to appropriately load this set of frames. More...
 
void SetProperty (const std::string &key, BaseProperty *value)
 Key-value store describing aspects of the image to be loaded. More...
 
BasePropertyGetProperty (const std::string &key) const
 Key-value store describing aspects of the image to be loaded. More...
 
std::string GetPropertyAsString (const std::string &) const
 Convenience function around GetProperty() More...
 
void SetFlag (const std::string &key, bool value)
 Convenience function around SetProperty() More...
 
bool GetFlag (const std::string &key, bool defaultValue) const
 Convenience function around GetProperty() More...
 
void SetIntProperty (const std::string &key, int value)
 Convenience function around SetProperty() More...
 
int GetIntProperty (const std::string &key, int defaultValue) const
 Convenience function around GetProperty() More...
 
PixelSpacingInterpretation GetPixelSpacingInterpretation () const
 Describe how the mitk::Image's pixel spacing should be interpreted. More...
 
void GetDesiredMITKImagePixelSpacing (ScalarType &spacingXinMM, ScalarType &spacingYinMM) const
 Describe the correct x/y pixel spacing of the mitk::Image (which some readers might need to adjust after loading) More...
 
void SetTiltInformation (const GantryTiltInformation &info)
 Describe the gantry tilt of the acquisition. More...
 
const GantryTiltInformation GetTiltInformation () const
 Describe the gantry tilt of the acquisition. More...
 
void SetSOPClassUID (const std::string &uid)
 SOP Class UID of this set of frames. More...
 
std::string GetSOPClassUID () const
 SOP Class UID of this set of frames. More...
 
std::string GetSOPClassUIDAsName () const
 SOP Class as human readable name (e.g. "CT Image Storage") More...
 
int GetNumberOfTimeSteps () const
 
int GetNumberOfFramesPerTimeStep () const
 
void SetTagCache (DICOMTagCache *privateCache)
 
void SetAdditionalTagsOfInterest (const AdditionalTagsMapType &tagMap)
 Set a list of DICOMTagPaths that specifiy all DICOM-Tags that will be copied into the property of the mitk::Image. More...
 
void SetTagLookupTableToPropertyFunctor (TagLookupTableToPropertyFunctor)
 Set a functor that defines how the slice-specific tag-values are stored in a Property. More...
 
void Print (std::ostream &os, bool filenameDetails) const
 Print information about this image block to given stream. More...
 

Static Public Member Functions

static DICOMTagList GetTagsOfInterest ()
 

Detailed Description

Output descriptor for DICOMFileReader.

As a result of analysis by a mitk::DICOMFileReader, this class describes the properties of a single mitk::Images that could be loaded by the file reader.

The descriptor contains the following information:

  • the mitk::Image itself. This will be NULL after analysis and only be present after actual loading.
  • a list of frames (mostly: filenames) that went into composition of the mitk::Image.
  • an assessment of the reader's ability to load this set of files (ReaderImplementationLevel)
  • this can be used for reader selection when one reader is able to load an image with correct colors and the other is able to produce only gray values, for example
  • description of aspects of the image. Mostly a key-value list implemented by means of mitk::PropertyList.
  • for specific keys and possible values, see documentation of specific readers.
Note
an mitk::Image may both consist of multiple files (the "old" DICOM way) or a mitk::Image may be described by a single DICOM file or even only parts of a DICOM file (the newer multi-frame DICOM classes). To reflect this DICOMImageFrameList describes a list of frames from different or a single file.

Described aspects of an image are:

  • whether pixel spacing is meant to be in-patient or on-detector (mitk::PixelSpacingInterpretation)
  • details about a possible gantry tilt (intended for use by file readers, may be hidden later)

Definition at line 80 of file mitkDICOMImageBlockDescriptor.h.

Member Typedef Documentation

Type specifies additional tags of interest. Key is the tag path of interest. The value is an optional user defined name for the property that should be used to store the tag value(s). Empty value is default and will imply to use the found DICOMTagPath as property name.

Definition at line 164 of file mitkDICOMImageBlockDescriptor.h.

Constructor & Destructor Documentation

mitk::DICOMImageBlockDescriptor::DICOMImageBlockDescriptor ( )

Definition at line 22 of file mitkDICOMImageBlockDescriptor.cpp.

mitk::DICOMImageBlockDescriptor::~DICOMImageBlockDescriptor ( )

Definition at line 31 of file mitkDICOMImageBlockDescriptor.cpp.

mitk::DICOMImageBlockDescriptor::DICOMImageBlockDescriptor ( const DICOMImageBlockDescriptor other)

Definition at line 35 of file mitkDICOMImageBlockDescriptor.cpp.

Member Function Documentation

void mitk::DICOMImageBlockDescriptor::GetDesiredMITKImagePixelSpacing ( ScalarType spacingXinMM,
ScalarType spacingYinMM 
) const

Describe the correct x/y pixel spacing of the mitk::Image (which some readers might need to adjust after loading)

Definition at line 320 of file mitkDICOMImageBlockDescriptor.cpp.

References mitk::DICOMStringToSpacing().

bool mitk::DICOMImageBlockDescriptor::GetFlag ( const std::string &  key,
bool  defaultValue 
) const

Convenience function around GetProperty()

Definition at line 367 of file mitkDICOMImageBlockDescriptor.cpp.

Referenced by mitk::ThreeDnTDICOMSeriesReader::LoadImages().

int mitk::DICOMImageBlockDescriptor::GetIntProperty ( const std::string &  key,
int  defaultValue 
) const
int mitk::DICOMImageBlockDescriptor::GetNumberOfFramesPerTimeStep ( ) const

return the number of frames that constitute one timestep.

Definition at line 581 of file mitkDICOMImageBlockDescriptor.cpp.

Referenced by mitk::ThreeDnTDICOMSeriesReader::LoadMitkImageForImageBlockDescriptor().

int mitk::DICOMImageBlockDescriptor::GetNumberOfTimeSteps ( ) const

Convinience method that returns the property timesteps

Definition at line 573 of file mitkDICOMImageBlockDescriptor.cpp.

Referenced by mitk::ThreeDnTDICOMSeriesReader::LoadMitkImageForImageBlockDescriptor().

mitk::PixelSpacingInterpretation mitk::DICOMImageBlockDescriptor::GetPixelSpacingInterpretation ( ) const

Describe how the mitk::Image's pixel spacing should be interpreted.

Definition at line 257 of file mitkDICOMImageBlockDescriptor.cpp.

References MITK_ERROR, mitk::SpacingAtDetector, mitk::SpacingInPatient, and mitk::SpacingUnknown.

mitk::BaseProperty * mitk::DICOMImageBlockDescriptor::GetProperty ( const std::string &  key) const

Key-value store describing aspects of the image to be loaded.

Definition at line 342 of file mitkDICOMImageBlockDescriptor.cpp.

std::string mitk::DICOMImageBlockDescriptor::GetPropertyAsString ( const std::string &  key) const

Convenience function around GetProperty()

Definition at line 348 of file mitkDICOMImageBlockDescriptor.cpp.

Referenced by mitk::BaseDICOMReaderService::Read().

mitk::ReaderImplementationLevel mitk::DICOMImageBlockDescriptor::GetReaderImplementationLevel ( ) const

Reader's capability to appropriately load this set of frames.

Definition at line 528 of file mitkDICOMImageBlockDescriptor.cpp.

std::string mitk::DICOMImageBlockDescriptor::GetSOPClassUID ( ) const

SOP Class UID of this set of frames.

Definition at line 533 of file mitkDICOMImageBlockDescriptor.cpp.

References MITK_ERROR.

std::string mitk::DICOMImageBlockDescriptor::GetSOPClassUIDAsName ( ) const

SOP Class as human readable name (e.g. "CT Image Storage")

Definition at line 548 of file mitkDICOMImageBlockDescriptor.cpp.

References MITK_ERROR.

mitk::DICOMTagList mitk::DICOMImageBlockDescriptor::GetTagsOfInterest ( )
static
const mitk::GantryTiltInformation mitk::DICOMImageBlockDescriptor::GetTiltInformation ( ) const
mitk::DICOMImageBlockDescriptor & mitk::DICOMImageBlockDescriptor::operator= ( const DICOMImageBlockDescriptor other)

Definition at line 57 of file mitkDICOMImageBlockDescriptor.cpp.

void mitk::DICOMImageBlockDescriptor::Print ( std::ostream &  os,
bool  filenameDetails 
) const

Print information about this image block to given stream.

Definition at line 638 of file mitkDICOMImageBlockDescriptor.cpp.

References mitk::PixelSpacingInterpretationToString(), printBool, printProperty, and printPropertyRange.

Referenced by mitk::DICOMFileReader::PrintOutputs().

void mitk::DICOMImageBlockDescriptor::SetAdditionalTagsOfInterest ( const AdditionalTagsMapType tagMap)

Set a list of DICOMTagPaths that specifiy all DICOM-Tags that will be copied into the property of the mitk::Image.

This method can be used to specify a list of DICOM-tags that shall be available after the loading. The value in the tagMap is an optional user defined name for the property key that should be used when storing the property). Empty value is default and will imply to use the found DICOMTagPath as property key. By default the content of the DICOM tags will be stored in a StringLookupTable on the mitk::Image. This behaviour can be changed by setting a different TagLookupTableToPropertyFunctor via SetTagLookupTableToPropertyFunctor().

Definition at line 118 of file mitkDICOMImageBlockDescriptor.cpp.

void mitk::DICOMImageBlockDescriptor::SetFlag ( const std::string &  key,
bool  value 
)

Convenience function around SetProperty()

Definition at line 362 of file mitkDICOMImageBlockDescriptor.cpp.

References mitk::BoolProperty::New().

void mitk::DICOMImageBlockDescriptor::SetImageFrameList ( const DICOMImageFrameList framelist)

List of frames that constitute the mitk::Image (DICOMImageFrames)

Definition at line 135 of file mitkDICOMImageBlockDescriptor.cpp.

Referenced by mitk::DICOMNullFileReader::AnalyzeInputFiles(), and mitk::TestDICOMLoading::DecorateVerifyCachedImage().

void mitk::DICOMImageBlockDescriptor::SetIntProperty ( const std::string &  key,
int  value 
)

Convenience function around SetProperty()

Definition at line 381 of file mitkDICOMImageBlockDescriptor.cpp.

References mitk::IntProperty::New().

void mitk::DICOMImageBlockDescriptor::SetProperty ( const std::string &  key,
BaseProperty value 
)

Key-value store describing aspects of the image to be loaded.

Definition at line 337 of file mitkDICOMImageBlockDescriptor.cpp.

void mitk::DICOMImageBlockDescriptor::SetReaderImplementationLevel ( const ReaderImplementationLevel level)

Reader's capability to appropriately load this set of frames.

Definition at line 523 of file mitkDICOMImageBlockDescriptor.cpp.

void mitk::DICOMImageBlockDescriptor::SetSOPClassUID ( const std::string &  uid)

SOP Class UID of this set of frames.

void mitk::DICOMImageBlockDescriptor::SetTagLookupTableToPropertyFunctor ( TagLookupTableToPropertyFunctor  functor)

Set a functor that defines how the slice-specific tag-values are stored in a Property.

This method sets a functor that is given a StringLookupTable that contains the values of one DICOM tag mapped to the slice index. The functor is supposed to store these values in an mitk Property.

By default, the StringLookupTable is stored in a StringLookupTableProperty except if all values are identical. In this case, the unique value is stored only once in a StringProperty.

Definition at line 852 of file mitkDICOMImageBlockDescriptor.cpp.

void mitk::DICOMImageBlockDescriptor::SetTiltInformation ( const GantryTiltInformation info)

Describe the gantry tilt of the acquisition.

Definition at line 125 of file mitkDICOMImageBlockDescriptor.cpp.

References info().


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