Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
#include <mitkDICOMSegmentationIO.h>
Public Types | |
typedef mitk::LabelSetImage | InputType |
typedef itk::Image< unsigned short, 3 > | itkInputImageType |
typedef itk::Image< short, 3 > | itkInternalImageType |
![]() | |
enum | ConfidenceLevel { Unsupported, PartiallySupported, Supported } |
A confidence level describing the confidence of the reader or writer in handling the given data. More... | |
typedef std::map< std::string, us::Any > | Options |
Options for reading or writing data. More... | |
typedef mitk::MessageAbstractDelegate1< float > | ProgressCallback |
Public Member Functions | |
DICOMSegmentationIO () | |
std::vector< BaseData::Pointer > | Read () override |
Reads a number of DICOM segmentation from the file system. More... | |
ConfidenceLevel | GetReaderConfidenceLevel () const override |
void | Write () override |
Write the base data to the specified location or output stream. More... | |
ConfidenceLevel | GetWriterConfidenceLevel () const override |
![]() | |
Options | GetReaderOptions () const |
us::Any | GetReaderOption (const std::string &name) const |
void | SetReaderOptions (const Options &options) |
void | SetReaderOption (const std::string &name, const us::Any &value) |
Options | GetWriterOptions () const |
us::Any | GetWriterOption (const std::string &name) const |
void | SetWriterOptions (const Options &options) |
void | SetWriterOption (const std::string &name, const us::Any &value) |
std::pair< us::ServiceRegistration< IFileReader >, us::ServiceRegistration< IFileWriter > > | RegisterService (us::ModuleContext *context=us::GetModuleContext()) |
![]() | |
ConfidenceLevel | GetConfidenceLevel () const override |
The confidence level of the reader or writer implementation. More... | |
![]() | |
void | SetInput (const std::string &location) override |
Set the input location. More... | |
void | SetInput (const std::string &location, std::istream *is) override |
Set an input stream to read from. More... | |
std::string | GetInputLocation () const override |
Get the current input location. More... | |
std::istream * | GetInputStream () const override |
Get the input stream. More... | |
MimeType | GetRegisteredMimeType () const |
DataStorage::SetOfObjects::Pointer | Read (mitk::DataStorage &ds) override |
Reads the specified file or input stream, loading its contents into the provided DataStorage. More... | |
ConfidenceLevel | GetConfidenceLevel () const override |
The confidence level of the reader or writer implementation. More... | |
Options | GetOptions () const override |
returns a list of the supported options More... | |
us::Any | GetOption (const std::string &name) const override |
void | SetOptions (const Options &options) override |
void | SetOption (const std::string &name, const us::Any &value) override |
void | AddProgressCallback (const ProgressCallback &callback) override |
void | RemoveProgressCallback (const ProgressCallback &callback) override |
us::ServiceRegistration< IFileReader > | RegisterService (us::ModuleContext *context=us::GetModuleContext()) |
void | UnregisterService () |
std::vector< std::string > | GetReadFiles () override |
![]() | |
~IFileReader () override | |
virtual | ~IFileReader () |
![]() | |
virtual | ~IFileIO () |
![]() | |
ConfidenceLevel | GetConfidenceLevel () const override |
The confidence level of the reader or writer implementation. More... | |
![]() | |
void | SetInput (const BaseData *data) override |
Set the input data for writing. More... | |
const BaseData * | GetInput () const override |
Get the input data set via SetInput(). More... | |
void | SetOutputLocation (const std::string &location) override |
Set the output location. More... | |
std::string | GetOutputLocation () const override |
Get the current output location. More... | |
void | SetOutputStream (const std::string &location, std::ostream *os) override |
Set an output stream for writing. More... | |
std::ostream * | GetOutputStream () const override |
Get the output stream. More... | |
ConfidenceLevel | GetConfidenceLevel () const override |
The confidence level of the reader or writer implementation. More... | |
MimeType | GetRegisteredMimeType () const |
Options | GetOptions () const override |
returns a list of the supported options More... | |
us::Any | GetOption (const std::string &name) const override |
void | SetOptions (const Options &options) override |
void | SetOption (const std::string &name, const us::Any &value) override |
void | AddProgressCallback (const ProgressCallback &callback) override |
void | RemoveProgressCallback (const ProgressCallback &callback) override |
us::ServiceRegistration< IFileWriter > | RegisterService (us::ModuleContext *context=us::GetModuleContext()) |
void | UnregisterService () |
![]() | |
~IFileWriter () override | |
Additional Inherited Members | |
![]() | |
static std::string | PROP_DESCRIPTION () |
Service property name for a description. More... | |
static std::string | PROP_MIMETYPE () |
Service property name for the mime-type associated with this file writer. More... | |
![]() | |
static std::string | PROP_BASEDATA_TYPE () |
Service property name for the supported mitk::BaseData sub-class. More... | |
![]() | |
AbstractFileIO (const AbstractFileIO &other) | |
AbstractFileIO (const std::string &baseDataType) | |
AbstractFileIO (const std::string &baseDataType, const CustomMimeType &mimeType, const std::string &description) | |
void | SetMimeType (const CustomMimeType &mimeType) |
const CustomMimeType * | GetMimeType () const |
void | SetReaderDescription (const std::string &description) |
std::string | GetReaderDescription () const |
void | SetWriterDescription (const std::string &description) |
std::string | GetWriterDescription () const |
void | SetDefaultReaderOptions (const Options &defaultOptions) |
Options | GetDefaultReaderOptions () const |
void | SetDefaultWriterOptions (const Options &defaultOptions) |
Options | GetDefaultWriterOptions () const |
void | SetReaderRanking (int ranking) |
Set the service ranking for this file reader. More... | |
int | GetReaderRanking () const |
void | SetWriterRanking (int ranking) |
int | GetWriterRanking () const |
![]() | |
AbstractFileIOReader () | |
AbstractFileIOReader (const CustomMimeType &mimeType, const std::string &description) | |
![]() | |
AbstractFileReader () | |
~AbstractFileReader () override | |
AbstractFileReader (const AbstractFileReader &other) | |
AbstractFileReader (const CustomMimeType &mimeType, const std::string &description) | |
virtual us::ServiceProperties | GetServiceProperties () const |
virtual us::ServiceRegistration< CustomMimeType > | RegisterMimeType (us::ModuleContext *context) |
void | SetMimeType (const CustomMimeType &mimeType) |
const CustomMimeType * | GetMimeType () const |
void | SetMimeTypePrefix (const std::string &prefix) |
std::string | GetMimeTypePrefix () const |
void | SetDescription (const std::string &description) |
std::string | GetDescription () const |
void | SetDefaultOptions (const Options &defaultOptions) |
Options | GetDefaultOptions () const |
void | SetRanking (int ranking) |
Set the service ranking for this file reader. More... | |
int | GetRanking () const |
std::string | GetLocalFileName () const |
Get a local file name for reading. More... | |
virtual void | SetDefaultDataNodeProperties (DataNode *node, const std::string &filePath) |
![]() | |
AbstractFileIOWriter (const std::string &baseDataType) | |
AbstractFileIOWriter (const std::string &baseDataType, const CustomMimeType &mimeType, const std::string &description) | |
![]() | |
~AbstractFileWriter () override | |
AbstractFileWriter (const AbstractFileWriter &other) | |
AbstractFileWriter (const std::string &baseDataType) | |
AbstractFileWriter (const std::string &baseDataType, const CustomMimeType &mimeType, const std::string &description) | |
virtual us::ServiceProperties | GetServiceProperties () const |
virtual us::ServiceRegistration< CustomMimeType > | RegisterMimeType (us::ModuleContext *context) |
void | SetMimeType (const CustomMimeType &mimeType) |
const CustomMimeType * | GetMimeType () const |
void | SetMimeTypePrefix (const std::string &prefix) |
std::string | GetMimeTypePrefix () const |
void | SetDescription (const std::string &description) |
Sets a human readable description of this writer. More... | |
std::string | GetDescription () const |
void | SetDefaultOptions (const Options &defaultOptions) |
Options | GetDefaultOptions () const |
void | SetRanking (int ranking) |
Set the service ranking for this file writer. More... | |
int | GetRanking () const |
void | SetBaseDataType (const std::string &baseDataType) |
Sets the name of the mitk::Basedata that this writer is able to handle. More... | |
virtual std::string | GetBaseDataType () const |
void | ValidateOutputLocation () const |
![]() | |
std::vector< std::string > | m_ReadFiles |
Read and Writes a LabelSetImage to a dcm file
Definition at line 27 of file mitkDICOMSegmentationIO.h.
Definition at line 30 of file mitkDICOMSegmentationIO.h.
typedef itk::Image<unsigned short, 3> mitk::DICOMSegmentationIO::itkInputImageType |
Definition at line 31 of file mitkDICOMSegmentationIO.h.
typedef itk::Image<short, 3> mitk::DICOMSegmentationIO::itkInternalImageType |
Definition at line 32 of file mitkDICOMSegmentationIO.h.
mitk::DICOMSegmentationIO::DICOMSegmentationIO | ( | ) |
Definition at line 42 of file mitkDICOMSegmentationIO.cpp.
References mitk::IDICOMTagsOfInterest::AddTagOfInterest(), mitk::DICOMSegmentationConstants::ANATOMIC_REGION_CODE_MEANING_PATH(), mitk::DICOMSegmentationConstants::ANATOMIC_REGION_CODE_SCHEME_PATH(), mitk::DICOMSegmentationConstants::ANATOMIC_REGION_CODE_VALUE_PATH(), mitk::DICOMSegmentationConstants::ANATOMIC_REGION_SEQUENCE_PATH(), mitk::GetDicomTagsOfInterestService(), mitk::AbstractFileIO::RegisterService(), mitk::DICOMSegmentationConstants::SEGMENT_ALGORITHM_TYPE_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_CATEGORY_CODE_MEANING_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_CATEGORY_CODE_SCHEME_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_CATEGORY_CODE_VALUE_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_LABEL_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_MODIFIER_CODE_MEANING_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_MODIFIER_CODE_SCHEME_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_MODIFIER_CODE_VALUE_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_NUMBER_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_SEQUENCE_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_TYPE_CODE_MEANING_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_TYPE_CODE_SCHEME_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_TYPE_CODE_VALUE_PATH(), mitk::DICOMSegmentationConstants::SEGMENTED_PROPERTY_CATEGORY_SEQUENCE_PATH(), mitk::DICOMSegmentationConstants::SEGMENTED_PROPERTY_MODIFIER_SEQUENCE_PATH(), mitk::DICOMSegmentationConstants::SEGMENTED_PROPERTY_TYPE_SEQUENCE_PATH(), mitk::AbstractFileReader::SetRanking(), and mitk::AbstractFileWriter::SetRanking().
Referenced by Read().
|
overridevirtual |
Reimplemented from mitk::AbstractFileIO.
Definition at line 247 of file mitkDICOMSegmentationIO.cpp.
References mitk::AbstractFileReader::GetLocalFileName(), mitk::AbstractFileIO::GetReaderConfidenceLevel(), mitk::IFileIO::Supported, and mitk::IFileIO::Unsupported.
|
overridevirtual |
Reimplemented from mitk::AbstractFileIO.
Definition at line 87 of file mitkDICOMSegmentationIO.cpp.
References mitk::Image::GetDimension(), mitk::AbstractFileWriter::GetInput(), mitk::BaseData::GetProperty(), mitk::AbstractFileIO::GetWriterConfidenceLevel(), MITK_INFO, mitk::IFileIO::Supported, and mitk::IFileIO::Unsupported.
|
overridevirtual |
Reads a number of DICOM segmentation from the file system.
throws | an mitk::Exception if an error ocurrs |
Implements mitk::AbstractFileReader.
Definition at line 271 of file mitkDICOMSegmentationIO.cpp.
References mitk::DICOMSegmentationConstants::ANATOMIC_REGION_CODE_MEANING_PATH(), mitk::DICOMSegmentationConstants::ANATOMIC_REGION_CODE_SCHEME_PATH(), mitk::DICOMSegmentationConstants::ANATOMIC_REGION_CODE_VALUE_PATH(), mitk::CastToMitkImage(), DICOMSegmentationIO(), mitk::DICOMTagPathToPropertyName(), mitk::ExtractPathsOfInterest(), mitk::GeneratePropertyNameForDICOMTag(), mitk::Label::GetColor(), mitk::GetDicomTagsOfInterestService(), mitk::AbstractFileWriter::GetInput(), mitk::AbstractFileReader::GetInputLocation(), mitk::LabelSetImage::GetLabelSet(), mitk::AbstractFileReader::GetLocalFileName(), mitk::Label::GetName(), mitk::PropertyList::GetProperty(), mitk::BaseData::GetPropertyList(), mitk::IDICOMTagsOfInterest::GetTagsOfInterest(), mitk::TemporoSpatialStringProperty::GetValue(), mitk::Label::GetValue(), mitk::TemporoSpatialStringProperty::GetValueAsString(), us::handler, image, mitk::LabelSet::IteratorConstBegin(), mitk::LabelSet::IteratorConstEnd(), MITK_ERROR, MITK_INFO, mitkThrow, mitk::LabelSetImage::New(), mitk::DICOMDCMTKTagScanner::New(), mitk::TemporoSpatialStringProperty::New(), mitk::DICOMSegmentationConstants::SEGMENT_ALGORITHM_TYPE_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_CATEGORY_CODE_MEANING_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_CATEGORY_CODE_SCHEME_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_CATEGORY_CODE_VALUE_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_LABEL_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_MODIFIER_CODE_MEANING_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_MODIFIER_CODE_SCHEME_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_MODIFIER_CODE_VALUE_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_NUMBER_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_TYPE_CODE_MEANING_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_TYPE_CODE_SCHEME_PATH(), mitk::DICOMSegmentationConstants::SEGMENT_TYPE_CODE_VALUE_PATH(), mitk::Label::SetColor(), mitk::Label::SetName(), mitk::SetProperties(), mitk::Label::SetProperty(), and mitk::Label::SetValue().
|
overridevirtual |
Write the base data to the specified location or output stream.
This method must be implemented for each specific writer. Call GetOutputStream() first and check for a non-null stream to write to. If the output stream is nullptr
, use GetOutputLocation() to write to a local file-system path.
If the reader cannot use streams directly, use GetLocalFile() to retrieve a temporary local file name instead.
mitk::Exception |
Implements mitk::AbstractFileWriter.
Definition at line 114 of file mitkDICOMSegmentationIO.cpp.
References mitk::AbstractFileWriter::LocalFile::GetFileName(), mitk::AbstractFileWriter::GetInput(), mitk::GenericLookupTable< T >::GetLookupTable(), mitk::LabelSet::IteratorConstBegin(), mitk::LabelSet::IteratorConstEnd(), MITK_ERROR, MITK_INFO, mitkThrow, mitk::ImageToItk< TOutputImage >::New(), mitk::LabelSetImage::SetActiveLayer(), and mitk::AbstractFileWriter::ValidateOutputLocation().