Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
Interface for DICOM readers that produce mitk::Images. More...
#include <mitkDICOMFileReader.h>
Public Types | |
typedef DICOMImageBlockDescriptor::AdditionalTagsMapType | AdditionalTagsMapType |
Public Member Functions | |
mitkClassMacroItkParent (DICOMFileReader, itk::Object) | |
virtual bool | CanHandleFile (const std::string &filename)=0 |
Indicate whether this reader can handle given file. More... | |
void | SetInputFiles (const StringList &filenames) |
This input files. More... | |
const StringList & | GetInputFiles () const |
This input files. More... | |
virtual void | AnalyzeInputFiles ()=0 |
Analyze input files. More... | |
unsigned int | GetNumberOfOutputs () const |
Number of outputs, only meaningful after calling AnalyzeInputFiles() More... | |
const DICOMImageBlockDescriptor & | GetOutput (unsigned int index) const |
Individual outputs, only meaningful after calling AnalyzeInputFiles(). More... | |
virtual bool | LoadImages ()=0 |
virtual DICOMTagPathList | GetTagsOfInterest () const =0 |
virtual void | SetTagCache (const DICOMTagCache::Pointer &)=0 |
A way to provide external knowledge about files and tag values is appreciated. 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 bool | operator== (const DICOMFileReader &other) const =0 |
virtual void | SetAdditionalTagsOfInterest (const AdditionalTagsMapType &tagList) |
Set a list of DICOMTagPaths that specifiy 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 bool | IsDICOM (const std::string &filename) |
Test whether a file is DICOM at all. More... | |
Protected Member Functions | |
DICOMFileReader () | |
~DICOMFileReader () override | |
DICOMFileReader (const DICOMFileReader &other) | |
DICOMFileReader & | operator= (const DICOMFileReader &other) |
void | ClearOutputs () |
void | SetNumberOfOutputs (unsigned int numberOfOutputs) |
void | SetOutput (unsigned int index, const DICOMImageBlockDescriptor &output) |
DICOMImageBlockDescriptor & | InternalGetOutput (unsigned int index) |
non-const access to the DICOMImageBlockDescriptor More... | |
virtual void | InternalPrintConfiguration (std::ostream &os) const =0 |
Configuration description for human reader, to be implemented by sub-classes. More... | |
virtual AdditionalTagsMapType | GetAdditionalTagsOfInterest () const |
mitk::DICOMImageBlockDescriptor::TagLookupTableToPropertyFunctor | GetTagLookupTableToPropertyFunctor () const |
Interface for DICOM readers that produce mitk::Images.
As described in The DICOMReader Module, this class structures the reader's part in the process of analyzing a set of DICOM files and selecting the most appropriate reader.
The overall loading process is as follows:
Sub-classes are required to implement a number of methods that reflect above structure. See mitk::DICOMITKSeriesGDCMReader for an example.
To help applications in describing different readers to the user, each reader brings a number of methods that describe its configuration/specifics by means of a short label and a (longer) description.
Definition at line 55 of file mitkDICOMFileReader.h.
typedef DICOMImageBlockDescriptor::AdditionalTagsMapType mitk::DICOMFileReader::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 108 of file mitkDICOMFileReader.h.
|
protected |
Definition at line 18 of file mitkDICOMFileReader.cpp.
References ~DICOMFileReader().
Referenced by ~DICOMFileReader().
|
overrideprotected |
Definition at line 24 of file mitkDICOMFileReader.cpp.
References DICOMFileReader().
Referenced by DICOMFileReader().
|
protected |
Definition at line 29 of file mitkDICOMFileReader.cpp.
References operator=().
|
pure virtual |
Analyze input files.
Implemented in mitk::DICOMITKSeriesGDCMReader, and mitk::DICOMNullFileReader.
Referenced by mitk::DICOMFileReaderTestHelper::TestMitkImagesAreLoaded(), mitk::DICOMFileReaderTestHelper::TestOutputsContainInputs(), and mitk::DICOMFileReaderTestHelper::TestSingleBlockIsRead().
|
pure virtual |
Indicate whether this reader can handle given file.
Implemented in mitk::DICOMITKSeriesGDCMReader, and mitk::DICOMNullFileReader.
|
protected |
Definition at line 106 of file mitkDICOMFileReader.cpp.
References SetNumberOfOutputs().
Referenced by mitk::DICOMNullFileReader::AnalyzeInputFiles(), mitk::DICOMITKSeriesGDCMReader::AnalyzeInputFiles(), and GetNumberOfOutputs().
|
protectedvirtual |
Definition at line 200 of file mitkDICOMFileReader.cpp.
Referenced by mitk::DICOMITKSeriesGDCMReader::AnalyzeInputFiles(), mitk::ThreeDnTDICOMSeriesReader::Condense3DBlocks(), and mitk::DICOMITKSeriesGDCMReader::GetTagsOfInterest().
std::string mitk::DICOMFileReader::GetConfigurationDescription | ( | ) | const |
One-sentence description of the reader's loading "strategy".
Definition at line 77 of file mitkDICOMFileReader.cpp.
References SetInputFiles().
Referenced by mitk::DICOMReaderConfigurator::CreateConfigStringFromReader(), and SetConfigurationDescription().
std::string mitk::DICOMFileReader::GetConfigurationLabel | ( | ) | const |
Short label/name to describe this reader.
Definition at line 62 of file mitkDICOMFileReader.cpp.
References SetConfigurationDescription().
Referenced by mitk::DICOMReaderConfigurator::CreateConfigStringFromReader(), and SetConfigurationLabel().
const mitk::StringList & mitk::DICOMFileReader::GetInputFiles | ( | ) | const |
This input files.
Definition at line 92 of file mitkDICOMFileReader.cpp.
References GetNumberOfOutputs().
Referenced by mitk::DICOMNullFileReader::AnalyzeInputFiles(), mitk::DICOMITKSeriesGDCMReader::AnalyzeInputFiles(), SetInputFiles(), and mitk::DICOMFileReaderTestHelper::TestInputFilenames().
unsigned int mitk::DICOMFileReader::GetNumberOfOutputs | ( | ) | const |
Number of outputs, only meaningful after calling AnalyzeInputFiles()
Definition at line 99 of file mitkDICOMFileReader.cpp.
References ClearOutputs().
Referenced by mitk::DICOMITKSeriesGDCMReader::AnalyzeInputFiles(), GetInputFiles(), mitk::ThreeDnTDICOMSeriesReader::LoadImages(), mitk::DICOMITKSeriesGDCMReader::LoadImages(), mitk::DICOMFileReaderTestHelper::TestInputFilenames(), mitk::DICOMFileReaderTestHelper::TestMitkImagesAreLoaded(), mitk::DICOMFileReaderTestHelper::TestOutputsContainInputs(), and mitk::DICOMFileReaderTestHelper::TestSingleBlockIsRead().
const mitk::DICOMImageBlockDescriptor & mitk::DICOMFileReader::GetOutput | ( | unsigned int | index | ) | const |
Individual outputs, only meaningful after calling AnalyzeInputFiles().
std::invalid_argument |
Definition at line 162 of file mitkDICOMFileReader.cpp.
References InternalGetOutput().
Referenced by PrintOutputs(), mitk::DICOMFileReaderTestHelper::TestMitkImagesAreLoaded(), and mitk::DICOMFileReaderTestHelper::TestOutputsContainInputs().
|
protected |
Definition at line 222 of file mitkDICOMFileReader.cpp.
Referenced by mitk::DICOMITKSeriesGDCMReader::AnalyzeInputFiles(), and mitk::ThreeDnTDICOMSeriesReader::Condense3DBlocks().
|
pure virtual |
Implemented in mitk::DICOMITKSeriesGDCMReader, and mitk::DICOMNullFileReader.
|
protected |
non-const access to the DICOMImageBlockDescriptor
Definition at line 177 of file mitkDICOMFileReader.cpp.
References IsDICOM().
Referenced by GetOutput(), mitk::ThreeDnTDICOMSeriesReader::LoadImages(), and mitk::DICOMITKSeriesGDCMReader::LoadMitkImageForOutput().
|
protectedpure virtual |
Configuration description for human reader, to be implemented by sub-classes.
Implemented in mitk::DICOMITKSeriesGDCMReader, and mitk::DICOMNullFileReader.
Referenced by PrintConfiguration().
|
static |
Test whether a file is DICOM at all.
Definition at line 193 of file mitkDICOMFileReader.cpp.
Referenced by InternalGetOutput(), mitkDICOMPreloadedVolumeTest(), and mitkDICOMTestingSanityTest().
|
pure virtual |
Load the mitk::Images in our outputs, the DICOMImageBlockDescriptor. To be called only after AnalyzeInputFiles(). Take care of potential exceptions!
Implemented in mitk::DICOMITKSeriesGDCMReader, mitk::ThreeDnTDICOMSeriesReader, and mitk::DICOMNullFileReader.
Referenced by mitk::DICOMFileReaderTestHelper::TestMitkImagesAreLoaded(), and mitk::DICOMFileReaderTestHelper::TestSingleBlockIsRead().
mitk::DICOMFileReader::mitkClassMacroItkParent | ( | DICOMFileReader | , |
itk::Object | |||
) |
|
protected |
Definition at line 40 of file mitkDICOMFileReader.cpp.
References SetConfigurationLabel().
Referenced by DICOMFileReader(), mitk::DICOMNullFileReader::operator=(), and mitk::DICOMITKSeriesGDCMReader::operator=().
|
pure virtual |
void mitk::DICOMFileReader::PrintConfiguration | ( | std::ostream & | os | ) | const |
Print configuration description to given stream, for human reader.
Definition at line 136 of file mitkDICOMFileReader.cpp.
References InternalPrintConfiguration(), and PrintOutputs().
Referenced by SetOutput().
void mitk::DICOMFileReader::PrintOutputs | ( | std::ostream & | os, |
bool | filenameDetails = false |
||
) | const |
Print output description to given stream, for human reader.
Definition at line 146 of file mitkDICOMFileReader.cpp.
References GetOutput(), and mitk::DICOMImageBlockDescriptor::Print().
Referenced by PrintConfiguration(), and mitk::DICOMFileReaderTestHelper::TestOutputsContainInputs().
|
virtual |
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 206 of file mitkDICOMFileReader.cpp.
void mitk::DICOMFileReader::SetConfigurationDescription | ( | const std::string & | desc | ) |
One-sentence description of the reader's loading "strategy".
Definition at line 69 of file mitkDICOMFileReader.cpp.
References GetConfigurationDescription().
Referenced by mitk::ClassicDICOMSeriesReader::ClassicDICOMSeriesReader(), and GetConfigurationLabel().
void mitk::DICOMFileReader::SetConfigurationLabel | ( | const std::string & | label | ) |
Short label/name to describe this reader.
Definition at line 54 of file mitkDICOMFileReader.cpp.
References GetConfigurationLabel().
Referenced by mitk::ClassicDICOMSeriesReader::ClassicDICOMSeriesReader(), and operator=().
void mitk::DICOMFileReader::SetInputFiles | ( | const StringList & | filenames | ) |
This input files.
Definition at line 84 of file mitkDICOMFileReader.cpp.
References GetInputFiles().
Referenced by GetConfigurationDescription(), mitk::DICOMFileReaderTestHelper::TestInputFilenames(), mitk::DICOMFileReaderTestHelper::TestMitkImagesAreLoaded(), mitk::DICOMFileReaderTestHelper::TestOutputsContainInputs(), and mitk::DICOMFileReaderTestHelper::TestSingleBlockIsRead().
|
protected |
Definition at line 113 of file mitkDICOMFileReader.cpp.
References SetOutput().
Referenced by mitk::DICOMNullFileReader::AnalyzeInputFiles(), mitk::DICOMITKSeriesGDCMReader::AnalyzeInputFiles(), ClearOutputs(), and mitk::ThreeDnTDICOMSeriesReader::Condense3DBlocks().
|
protected |
Definition at line 120 of file mitkDICOMFileReader.cpp.
References PrintConfiguration().
Referenced by mitk::DICOMNullFileReader::AnalyzeInputFiles(), mitk::DICOMITKSeriesGDCMReader::AnalyzeInputFiles(), mitk::ThreeDnTDICOMSeriesReader::Condense3DBlocks(), and SetNumberOfOutputs().
|
pure virtual |
A way to provide external knowledge about files and tag values is appreciated.
Implemented in mitk::DICOMITKSeriesGDCMReader, and mitk::DICOMNullFileReader.
|
virtual |
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 214 of file mitkDICOMFileReader.cpp.