Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::CESTDICOMManualReaderService Class Reference

Service wrapper for generic CEST DICOM loading with manual meta data configuration. More...

#include <mitkCESTGenericDICOMReaderService.h>

Inheritance diagram for mitk::CESTDICOMManualReaderService:
Collaboration diagram for mitk::CESTDICOMManualReaderService:

Public Member Functions

 CESTDICOMManualReaderService (const CustomMimeType &mimeType, const std::string &description)
 Construct with a specific MIME type and description. More...
 
std::vector< itk::SmartPointer< BaseData > > Read () override
 Read the specified file or input stream and return its contents. More...
 
Options GetOptions () const override
 Return the available reader options including CEST-specific parameters. More...
 
us::Any GetOption (const std::string &name) const override
 Return the value of a specific reader option. More...
 
std::vector< itk::SmartPointer< BaseData > > Read () override
 Read DICOM files and enrich the result with CEST meta data. More...
 
DataStorage::SetOfObjects::Pointer Read (mitk::DataStorage &ds) override
 Read DICOM files and enrich the result with CEST meta data. More...
 
- Public Member Functions inherited from mitk::BaseDICOMReaderService
IFileReader::ConfidenceLevel GetConfidenceLevel () const override
 Determine the confidence level for reading a given file. More...
 
std::vector< itk::SmartPointer< BaseData > > Read () override
 Read data and create a list of BaseData objects. More...
 
DataStorage::SetOfObjects::Pointer Read (mitk::DataStorage &ds) override
 Read data and add it to the given DataStorage. More...
 
- Public Member Functions inherited from mitk::AbstractFileReader
void SetInput (const std::string &location) override
 Set the input file path, clearing any previously set input stream. More...
 
void SetInput (const std::string &location, std::istream *is) override
 Set an input stream and associated location label. More...
 
std::string GetInputLocation () const override
 Get the current input location. More...
 
std::istream * GetInputStream () const override
 Get the current input stream. More...
 
MimeType GetRegisteredMimeType () const
 Get the mime-type that was registered for this reader. More...
 
DataStorage::SetOfObjects::Pointer Read (mitk::DataStorage &ds) override
 Read data and add it to the given DataStorage. More...
 
Options GetOptions () const override
 Get the current option values. More...
 
us::Any GetOption (const std::string &name) const override
 Get the value of a specific option. More...
 
void SetOptions (const Options &options) override
 Set multiple options at once. More...
 
void SetOption (const std::string &name, const us::Any &value) override
 Set a single option value. More...
 
void AddProgressCallback (const ProgressCallback &callback) override
 Register a progress callback. More...
 
void RemoveProgressCallback (const ProgressCallback &callback) override
 Remove a previously registered progress callback. More...
 
us::ServiceRegistration< IFileReader > RegisterService (us::ModuleContext *context=us::GetModuleContext())
 Register this reader as a CppMicroServices service. More...
 
void UnregisterService ()
 Unregister this reader from the CppMicroServices registry. More...
 
std::vector< std::string > GetReadFiles () override
 Get the list of files consumed during the last Read() call. More...
 
void SetProperties (const PropertyList *properties) override
 Set base data properties as a source of meta data for reading. More...
 
- Public Member Functions inherited from mitk::IFileReader
 ~IFileReader () override
 
virtual ~IFileReader ()
 
- Public Member Functions inherited from mitk::IFileIO
virtual ~IFileIO ()
 

Protected Member Functions

 CESTDICOMManualReaderService (const CESTDICOMManualReaderService &)=default
 
CESTDICOMManualReaderService & operator= (const CESTDICOMManualReaderService &)=delete
 
std::string GetCESTMetaFilePath () const
 Return the path to the CEST meta JSON file in the same directory as the DICOM files. More...
 
std::string GetTRECFilePath () const
 Return the path to the TREC file in the same directory as the DICOM files. More...
 
std::string GetLISTFilePath () const
 Return the path to the LIST file in the same directory as the DICOM files. More...
 
mitk::DICOMFileReader::Pointer GetReader (const mitk::StringList &relevantFiles) const override
 Return the reader instance that should be used for loading. More...
 
- Protected Member Functions inherited from mitk::BaseDICOMReaderService
 BaseDICOMReaderService (const std::string &description)
 Construct with the default DICOM MIME type and a description string. More...
 
 BaseDICOMReaderService (const mitk::CustomMimeType &customType, const std::string &description)
 Construct with a custom MIME type and a description string. More...
 
std::vector< itk::SmartPointer< BaseData > > DoRead () override
 Perform the actual reading of DICOM data. More...
 
mitk::StringList GetDICOMFilesInSameDirectory () const
 Returns the list of all DICOM files in the same directory as this->GetLocalFileName(). More...
 
void SetOnlyRegardOwnSeries (bool onlyRegardOwnSeries)
 Set whether only files from the same DICOM series should be loaded. More...
 
bool GetOnlyRegardOwnSeries () const
 Get whether only files from the same DICOM series are loaded. More...
 
- Protected Member Functions inherited from mitk::AbstractFileReader
 AbstractFileReader ()
 Default constructor. More...
 
 ~AbstractFileReader () override
 
 AbstractFileReader (const AbstractFileReader &other)
 Copy constructor. More...
 
 AbstractFileReader (const CustomMimeType &mimeType, const std::string &description)
 Associate this reader instance with the given MIME type. More...
 
virtual us::ServiceProperties GetServiceProperties () const
 Get the service properties for registration. More...
 
virtual us::ServiceRegistration< CustomMimeType > RegisterMimeType (us::ModuleContext *context)
 Register a new CustomMimeType service object. More...
 
void SetMimeType (const CustomMimeType &mimeType)
 Set the MIME type this reader can handle. More...
 
const CustomMimeType * GetMimeType () const
 Get the MIME type this reader can handle. More...
 
void SetMimeTypePrefix (const std::string &prefix)
 Set the prefix used for auto-generated MIME type names. More...
 
std::string GetMimeTypePrefix () const
 Get the current MIME type name prefix. More...
 
void SetDescription (const std::string &description)
 Set the human-readable description of this reader. More...
 
std::string GetDescription () const
 Get the human-readable description of this reader. More...
 
void SetDefaultOptions (const Options &defaultOptions)
 Set the default options for this reader. More...
 
Options GetDefaultOptions () const
 Get the default options for this reader. More...
 
void SetRanking (int ranking)
 Set the service ranking for this file reader. More...
 
int GetRanking () const
 Get the service ranking for this file reader. More...
 
std::string GetLocalFileName () const
 Get a local file name for reading. More...
 
virtual void SetDefaultDataNodeProperties (DataNode *node, const std::string &filePath)
 Set default properties on a DataNode after reading. More...
 
const PropertyList * GetProperties () const override
 Get the properties set via SetProperties(). More...
 

Additional Inherited Members

- Public Types inherited from mitk::IFileIO
enum  ConfidenceLevel { Unsupported , PartiallySupported , Supported }
 A confidence level describing the reader's or writer's ability to handle the given data or file format. More...
 
typedef std::map< std::string, us::Any > Options
 Options for reading or writing data. More...
 
typedef mitk::MessageAbstractDelegate1< float > ProgressCallback
 Callback delegate type for progress reporting. More...
 
- Static Public Member Functions inherited from mitk::IFileIO
static std::string PROP_DESCRIPTION ()
 Service property name for a human-readable description. More...
 
static std::string PROP_MIMETYPE ()
 Service property name for the mime-type associated with this reader or writer. More...
 
- Protected Attributes inherited from mitk::AbstractFileReader
std::vector< std::string > m_ReadFiles
 List of files consumed during the last Read() call. Must be filled by DoRead(). More...
 

Detailed Description

Service wrapper for generic CEST DICOM loading with manual meta data configuration.

Auto-selects the best DICOMFileReader from the DICOM module using mitk::DICOMFileReaderSelector and loads CEST-relevant meta data from a provided cest_meta.json file or from user-supplied reader options.

Definition at line 27 of file mitkCESTGenericDICOMReaderService.h.

Constructor & Destructor Documentation

◆ CESTDICOMManualReaderService() [1/2]

mitk::CESTDICOMManualReaderService::CESTDICOMManualReaderService ( const CustomMimeType &  mimeType,
const std::string &  description 
)

Construct with a specific MIME type and description.

Parameters
mimeTypeThe custom MIME type this reader handles.
descriptionHuman-readable description of this reader service.

◆ CESTDICOMManualReaderService() [2/2]

mitk::CESTDICOMManualReaderService::CESTDICOMManualReaderService ( const CESTDICOMManualReaderService &  )
protecteddefault

Member Function Documentation

◆ GetCESTMetaFilePath()

std::string mitk::CESTDICOMManualReaderService::GetCESTMetaFilePath ( ) const
protected

Return the path to the CEST meta JSON file in the same directory as the DICOM files.

◆ GetLISTFilePath()

std::string mitk::CESTDICOMManualReaderService::GetLISTFilePath ( ) const
protected

Return the path to the LIST file in the same directory as the DICOM files.

◆ GetOption()

us::Any mitk::CESTDICOMManualReaderService::GetOption ( const std::string &  name) const
overridevirtual

Return the value of a specific reader option.

Parameters
nameThe option name to query.
Returns
The option value.

Implements mitk::IFileIO.

◆ GetOptions()

Options mitk::CESTDICOMManualReaderService::GetOptions ( ) const
overridevirtual

Return the available reader options including CEST-specific parameters.

Implements mitk::IFileIO.

◆ GetReader()

mitk::DICOMFileReader::Pointer mitk::CESTDICOMManualReaderService::GetReader ( const mitk::StringList &  relevantFiles) const
overrideprotectedvirtual

Return the reader instance that should be used for loading.

Parameters
relevantFilesList of file paths to consider for reader selection.
Returns
A configured DICOMFileReader instance.

Implements mitk::BaseDICOMReaderService.

◆ GetTRECFilePath()

std::string mitk::CESTDICOMManualReaderService::GetTRECFilePath ( ) const
protected

Return the path to the TREC file in the same directory as the DICOM files.

◆ operator=()

CESTDICOMManualReaderService& mitk::CESTDICOMManualReaderService::operator= ( const CESTDICOMManualReaderService &  )
protecteddelete

◆ Read() [1/3]

std::vector<itk::SmartPointer<BaseData> > mitk::AbstractFileReader::Read
overridevirtual

Read DICOM files and enrich the result with CEST meta data.

Uses the AbstractFileReader Read function and adds extra steps for parsing CEST meta data from JSON files or reader options.

Returns
A vector of loaded BaseData objects with CEST properties.

Reimplemented from mitk::AbstractFileReader.

◆ Read() [2/3]

std::vector<itk::SmartPointer<BaseData> > mitk::CESTDICOMManualReaderService::Read ( )
overridevirtual

Read the specified file or input stream and return its contents.

Returns
A list of created BaseData objects.

If GetInputStream() returns a non-null value, this method must use the returned stream object to read the data from. If no input stream was set, the data must be read from the path returned by GetInputLocation().

Exceptions
mitk::Exceptionif the data could not be read.

Implements mitk::IFileReader.

◆ Read() [3/3]

DataStorage::SetOfObjects::Pointer mitk::AbstractFileReader::Read
overridevirtual

Read DICOM files and enrich the result with CEST meta data.

Uses the AbstractFileReader Read function and adds extra steps for parsing CEST meta data from JSON files or reader options.

Returns
A vector of loaded BaseData objects with CEST properties.

Reimplemented from mitk::AbstractFileReader.


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