15 #include <itkGDCMImageIO.h> 31 ,m_InputFilenames( other.m_InputFilenames )
32 ,m_Outputs( other.m_Outputs )
33 ,m_ConfigLabel( other.m_ConfigLabel )
34 ,m_ConfigDescription( other.m_ConfigDescription )
44 m_InputFilenames = other.m_InputFilenames;
45 m_Outputs = other.m_Outputs;
46 m_ConfigLabel = other.m_ConfigLabel;
47 m_ConfigDescription = other.m_ConfigDescription;
56 m_ConfigLabel = label;
71 m_ConfigDescription = desc;
79 return m_ConfigDescription;
86 m_InputFilenames = filenames;
94 return m_InputFilenames;
101 return m_Outputs.size();
115 m_Outputs.resize(numberOfOutputs);
122 if (index < m_Outputs.size())
124 m_Outputs[index] = output;
128 std::stringstream ss;
129 ss <<
"Index " << index <<
" out of range (" << m_Outputs.size() <<
" indices reserved)";
130 throw std::invalid_argument( ss.str() );
138 os <<
"---- Configuration of " << this->GetNameOfClass() <<
" " << (
void*)
this <<
" ----"<< std::endl;
140 os <<
"---- End of configuration ----" << std::endl;
148 os <<
"---- Outputs of DICOMFilereader " << (
void*)
this <<
" ----"<< std::endl;
150 for (
unsigned int o = 0; o < m_Outputs.size(); ++o)
152 os <<
"-- Output " << o << std::endl;
154 block.
Print(os, filenameDetails);
156 os <<
"---- End of output list ----" << std::endl;
164 if (index < m_Outputs.size())
166 return m_Outputs[index];
170 std::stringstream ss;
171 ss <<
"Index " << index <<
" out of range (" << m_Outputs.size() <<
" indices reserved)";
172 throw std::invalid_argument( ss.str() );
179 if (index < m_Outputs.size())
181 return m_Outputs[index];
185 std::stringstream ss;
186 ss <<
"Index " << index <<
" out of range (" << m_Outputs.size() <<
" indices reserved)";
187 throw std::invalid_argument( ss.str() );
195 itk::GDCMImageIO::Pointer io = itk::GDCMImageIO::New();
196 return io->CanReadFile( filename.c_str() );
202 return m_AdditionalTagsOfInterest;
209 m_AdditionalTagsOfInterest = tagList;
217 m_TagLookupTableToPropertyFunctor = functor;
224 return m_TagLookupTableToPropertyFunctor;
mitk::DICOMImageBlockDescriptor::TagLookupTableToPropertyFunctor GetTagLookupTableToPropertyFunctor() const
void Print(std::ostream &os, bool filenameDetails) const
Print information about this image block to given stream.
void PrintConfiguration(std::ostream &os) const
Print configuration description to given stream, for human reader.
static bool IsDICOM(const std::string &filename)
Test whether a file is DICOM at all.
void SetConfigurationDescription(const std::string &)
One-sentence description of the reader's loading "strategy".
void SetNumberOfOutputs(unsigned int numberOfOutputs)
virtual AdditionalTagsMapType GetAdditionalTagsOfInterest() const
virtual void InternalPrintConfiguration(std::ostream &os) const =0
Configuration description for human reader, to be implemented by sub-classes.
void SetConfigurationLabel(const std::string &)
Short label/name to describe this reader.
void SetOutput(unsigned int index, const DICOMImageBlockDescriptor &output)
virtual void SetTagLookupTableToPropertyFunctor(mitk::DICOMImageBlockDescriptor::TagLookupTableToPropertyFunctor functor)
Set a functor that defines how the slice-specific tag-values are stored in a Property.
void SetInputFiles(const StringList &filenames)
This input files.
const StringList & GetInputFiles() const
This input files.
std::function< mitk::BaseProperty::Pointer(const DICOMCachedValueLookupTable &) > TagLookupTableToPropertyFunctor
unsigned int GetNumberOfOutputs() const
Number of outputs, only meaningful after calling AnalyzeInputFiles()
std::string GetConfigurationDescription() const
One-sentence description of the reader's loading "strategy".
const DICOMImageBlockDescriptor & GetOutput(unsigned int index) const
Individual outputs, only meaningful after calling AnalyzeInputFiles().
DICOMImageBlockDescriptor & InternalGetOutput(unsigned int index)
non-const access to the DICOMImageBlockDescriptor
DICOMImageBlockDescriptor::AdditionalTagsMapType AdditionalTagsMapType
void PrintOutputs(std::ostream &os, bool filenameDetails=false) const
Print output description to given stream, for human reader.
Output descriptor for DICOMFileReader.
std::string GetConfigurationLabel() const
Short label/name to describe this reader.
std::vector< std::string > StringList
DICOMFileReader & operator=(const DICOMFileReader &other)
~DICOMFileReader() override
Interface for DICOM readers that produce mitk::Images.
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...