Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
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 () override | |
DICOMImageBlockDescriptor (const DICOMImageBlockDescriptor &other) | |
DICOMImageBlockDescriptor & | operator= (const DICOMImageBlockDescriptor &other) |
void | SetImageFrameList (const DICOMImageFrameList &framelist) |
List of frames that constitute the mitk::Image (DICOMImageFrames) More... | |
const DICOMImageFrameList & | GetImageFrameList () 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... | |
BaseProperty * | GetProperty (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... | |
BaseProperty::ConstPointer | GetConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const override |
Get property by its key. More... | |
std::vector< std::string > | GetPropertyKeys (const std::string &contextName="", bool includeDefaultContext=false) const override |
Query keys of existing properties. More... | |
std::vector< std::string > | GetPropertyContextNames () const override |
Query names of existing contexts. 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... | |
![]() | |
virtual | ~IPropertyProvider () |
Static Public Member Functions | |
static DICOMTagList | GetTagsOfInterest () |
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:
Described aspects of an image are:
Definition at line 77 of file mitkDICOMImageBlockDescriptor.h.
typedef std::map<DICOMTagPath, std::string> mitk::DICOMImageBlockDescriptor::AdditionalTagsMapType |
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 170 of file mitkDICOMImageBlockDescriptor.h.
typedef std::function<mitk::BaseProperty::Pointer(const DICOMCachedValueLookupTable&) > mitk::DICOMImageBlockDescriptor::TagLookupTableToPropertyFunctor |
Definition at line 184 of file mitkDICOMImageBlockDescriptor.h.
mitk::DICOMImageBlockDescriptor::DICOMImageBlockDescriptor | ( | ) |
Definition at line 19 of file mitkDICOMImageBlockDescriptor.cpp.
|
override |
Definition at line 28 of file mitkDICOMImageBlockDescriptor.cpp.
mitk::DICOMImageBlockDescriptor::DICOMImageBlockDescriptor | ( | const DICOMImageBlockDescriptor & | other | ) |
Definition at line 32 of file mitkDICOMImageBlockDescriptor.cpp.
References operator=().
|
overridevirtual |
Get property by its key.
[in] | propertyKey | Key of property. |
[in] | contextName | Optional, default is empty string (default context). Search in specified context. |
[in] | fallBackOnDefaultContext | Optional, default is true. Also search in default context if property was not found in given context. |
Implements mitk::IPropertyProvider.
Definition at line 872 of file mitkDICOMImageBlockDescriptor.cpp.
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 317 of file mitkDICOMImageBlockDescriptor.cpp.
References mitk::DICOMStringToSpacing().
Referenced by GetMitkImage().
bool mitk::DICOMImageBlockDescriptor::GetFlag | ( | const std::string & | key, |
bool | defaultValue | ||
) | const |
Convenience function around GetProperty()
Definition at line 370 of file mitkDICOMImageBlockDescriptor.cpp.
References GetProperty().
Referenced by GetIntProperty(), and mitk::ThreeDnTDICOMSeriesReader::LoadImages().
const mitk::DICOMImageFrameList & mitk::DICOMImageBlockDescriptor::GetImageFrameList | ( | ) | const |
List of frames that constitute the mitk::Image (DICOMImageFrames)
Definition at line 141 of file mitkDICOMImageBlockDescriptor.cpp.
Referenced by mitk::ThreeDnTDICOMSeriesReader::LoadMitkImageForImageBlockDescriptor(), mitk::DICOMITKSeriesGDCMReader::LoadMitkImageForImageBlockDescriptor(), main(), mitk::DICOMFileReaderTestHelper::TestMitkImagesAreLoaded(), and mitk::DICOMFileReaderTestHelper::TestOutputsContainInputs().
int mitk::DICOMImageBlockDescriptor::GetIntProperty | ( | const std::string & | key, |
int | defaultValue | ||
) | const |
Convenience function around GetProperty()
Definition at line 389 of file mitkDICOMImageBlockDescriptor.cpp.
References GetFlag(), GetPixelSpacingInterpretation(), GetProperty(), GetPropertyAsString(), GetSOPClassUID(), GetSOPClassUIDAsName(), GetTiltInformation(), mitk::BoolProperty::New(), mitk::StringProperty::New(), mitk::LevelWindowProperty::New(), mitk::PixelSpacingInterpretationToString(), mitk::ReaderImplementationLevelToString(), and mitk::BaseData::SetProperty().
mitk::Image::Pointer mitk::DICOMImageBlockDescriptor::GetMitkImage | ( | ) | const |
the 3D mitk::Image that is loaded from the DICOM files of a DICOMImageFrameList
Definition at line 174 of file mitkDICOMImageBlockDescriptor.cpp.
References GetDesiredMITKImagePixelSpacing(), mitk::BaseData::GetGeometry(), mitk::BaseGeometry::GetSpacing(), MITK_DEBUG, and mitk::BaseGeometry::SetSpacing().
Referenced by mitk::TestDICOMLoading::DecorateVerifyCachedImage(), mitk::TestDICOMLoading::LoadFiles(), mitkDICOMSimpleVolumeImportTest(), mitk::BaseDICOMReaderService::Read(), mitk::RTDoseReaderService::Read(), and mitk::DICOMFileReaderTestHelper::TestMitkImagesAreLoaded().
int mitk::DICOMImageBlockDescriptor::GetNumberOfFramesPerTimeStep | ( | ) | const |
return the number of frames that constitute one timestep.
Definition at line 584 of file mitkDICOMImageBlockDescriptor.cpp.
References GetNumberOfTimeSteps().
Referenced by mitk::ThreeDnTDICOMSeriesReader::LoadMitkImageForImageBlockDescriptor().
int mitk::DICOMImageBlockDescriptor::GetNumberOfTimeSteps | ( | ) | const |
Convinience method that returns the property timesteps
Definition at line 576 of file mitkDICOMImageBlockDescriptor.cpp.
Referenced by GetNumberOfFramesPerTimeStep(), and mitk::ThreeDnTDICOMSeriesReader::LoadMitkImageForImageBlockDescriptor().
mitk::PixelSpacingInterpretation mitk::DICOMImageBlockDescriptor::GetPixelSpacingInterpretation | ( | ) | const |
Describe how the mitk::Image's pixel spacing should be interpreted.
Definition at line 254 of file mitkDICOMImageBlockDescriptor.cpp.
References MITK_ERROR, mitk::SpacingAtDetector, mitk::SpacingInPatient, and mitk::SpacingUnknown.
Referenced by GetIntProperty(), and Print().
mitk::BaseProperty * mitk::DICOMImageBlockDescriptor::GetProperty | ( | const std::string & | key | ) | const |
Key-value store describing aspects of the image to be loaded.
Definition at line 345 of file mitkDICOMImageBlockDescriptor.cpp.
Referenced by GetFlag(), and GetIntProperty().
std::string mitk::DICOMImageBlockDescriptor::GetPropertyAsString | ( | const std::string & | key | ) | const |
Convenience function around GetProperty()
Definition at line 351 of file mitkDICOMImageBlockDescriptor.cpp.
Referenced by GetIntProperty().
|
overridevirtual |
Query names of existing contexts.
Implements mitk::IPropertyProvider.
Definition at line 885 of file mitkDICOMImageBlockDescriptor.cpp.
|
overridevirtual |
Query keys of existing properties.
[in] | contextName | Optional, default is empty string (default context). Search in specified context. |
[in] | includeDefaultContext | Optional, default is false. Include default context. |
Implements mitk::IPropertyProvider.
Definition at line 879 of file mitkDICOMImageBlockDescriptor.cpp.
mitk::ReaderImplementationLevel mitk::DICOMImageBlockDescriptor::GetReaderImplementationLevel | ( | ) | const |
Reader's capability to appropriately load this set of frames.
Definition at line 531 of file mitkDICOMImageBlockDescriptor.cpp.
std::string mitk::DICOMImageBlockDescriptor::GetSOPClassUID | ( | ) | const |
SOP Class UID of this set of frames.
Definition at line 536 of file mitkDICOMImageBlockDescriptor.cpp.
References MITK_ERROR.
Referenced by GetIntProperty(), and GetSOPClassUIDAsName().
std::string mitk::DICOMImageBlockDescriptor::GetSOPClassUIDAsName | ( | ) | const |
SOP Class as human readable name (e.g. "CT Image Storage")
Definition at line 551 of file mitkDICOMImageBlockDescriptor.cpp.
References GetSOPClassUID(), and MITK_ERROR.
Referenced by GetIntProperty(), and Print().
|
static |
Definition at line 84 of file mitkDICOMImageBlockDescriptor.cpp.
Referenced by mitk::DICOMITKSeriesGDCMReader::GetTagsOfInterest().
const mitk::GantryTiltInformation mitk::DICOMImageBlockDescriptor::GetTiltInformation | ( | ) | const |
Describe the gantry tilt of the acquisition.
Definition at line 127 of file mitkDICOMImageBlockDescriptor.cpp.
Referenced by GetIntProperty(), mitk::ThreeDnTDICOMSeriesReader::LoadMitkImageForImageBlockDescriptor(), mitk::DICOMITKSeriesGDCMReader::LoadMitkImageForImageBlockDescriptor(), and Print().
mitk::DICOMImageBlockDescriptor & mitk::DICOMImageBlockDescriptor::operator= | ( | const DICOMImageBlockDescriptor & | other | ) |
Definition at line 54 of file mitkDICOMImageBlockDescriptor.cpp.
Referenced by DICOMImageBlockDescriptor().
void mitk::DICOMImageBlockDescriptor::Print | ( | std::ostream & | os, |
bool | filenameDetails | ||
) | const |
Print information about this image block to given stream.
Definition at line 641 of file mitkDICOMImageBlockDescriptor.cpp.
References GetPixelSpacingInterpretation(), GetSOPClassUIDAsName(), GetTiltInformation(), 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 115 of file mitkDICOMImageBlockDescriptor.cpp.
void mitk::DICOMImageBlockDescriptor::SetFlag | ( | const std::string & | key, |
bool | value | ||
) |
Convenience function around SetProperty()
Definition at line 365 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 132 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 384 of file mitkDICOMImageBlockDescriptor.cpp.
References mitk::IntProperty::New().
void mitk::DICOMImageBlockDescriptor::SetMitkImage | ( | Image::Pointer | image | ) |
The 3D mitk::Image that is loaded from the DICOM files of a DICOMImageFrameList.
Definition at line 146 of file mitkDICOMImageBlockDescriptor.cpp.
References MITK_ERROR.
Referenced by mitk::TestDICOMLoading::DecorateVerifyCachedImage(), mitk::ThreeDnTDICOMSeriesReader::LoadMitkImageForImageBlockDescriptor(), and mitk::DICOMITKSeriesGDCMReader::LoadMitkImageForImageBlockDescriptor().
void mitk::DICOMImageBlockDescriptor::SetProperty | ( | const std::string & | key, |
BaseProperty * | value | ||
) |
Key-value store describing aspects of the image to be loaded.
Definition at line 340 of file mitkDICOMImageBlockDescriptor.cpp.
void mitk::DICOMImageBlockDescriptor::SetReaderImplementationLevel | ( | const ReaderImplementationLevel & | level | ) |
Reader's capability to appropriately load this set of frames.
Definition at line 526 of file mitkDICOMImageBlockDescriptor.cpp.
void mitk::DICOMImageBlockDescriptor::SetSOPClassUID | ( | const std::string & | uid | ) |
SOP Class UID of this set of frames.
void mitk::DICOMImageBlockDescriptor::SetTagCache | ( | DICOMTagCache * | privateCache | ) |
Definition at line 595 of file mitkDICOMImageBlockDescriptor.cpp.
Referenced by mitk::DICOMITKSeriesGDCMReader::AnalyzeInputFiles(), mitk::ThreeDnTDICOMSeriesReader::Condense3DBlocks(), and mitk::TestDICOMLoading::DecorateVerifyCachedImage().
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 864 of file mitkDICOMImageBlockDescriptor.cpp.
void mitk::DICOMImageBlockDescriptor::SetTiltInformation | ( | const GantryTiltInformation & | info | ) |
Describe the gantry tilt of the acquisition.
Definition at line 122 of file mitkDICOMImageBlockDescriptor.cpp.
References info().