Medical Imaging Interaction Toolkit  2018.4.99-c0f884b2
Medical Imaging Interaction Toolkit
mitk::FileReaderWriterBase Class Reference

#include <mitkFileReaderWriterBase.h>

Inheritance diagram for mitk::FileReaderWriterBase:
Collaboration diagram for mitk::FileReaderWriterBase:

Public Types

typedef std::map< std::string, us::AnyOptions
 
typedef mitk::MessageAbstractDelegate1< float > ProgressCallback
 

Public Member Functions

 FileReaderWriterBase ()
 
virtual ~FileReaderWriterBase ()
 
Options GetOptions () const
 
us::Any GetOption (const std::string &name) const
 
void SetOptions (const Options &options)
 
void SetOption (const std::string &name, const us::Any &value)
 
void SetDefaultOptions (const Options &defaultOptions)
 
Options GetDefaultOptions () const
 
void SetRanking (int ranking)
 Set the service ranking for this file reader. More...
 
int GetRanking () const
 
void SetMimeType (const CustomMimeType &mimeType)
 
const CustomMimeTypeGetMimeType () const
 
CustomMimeTypeGetMimeType ()
 
MimeType GetRegisteredMimeType () const
 
void SetMimeTypePrefix (const std::string &prefix)
 
std::string GetMimeTypePrefix () const
 
void SetDescription (const std::string &description)
 
std::string GetDescription () const
 
void AddProgressCallback (const ProgressCallback &callback)
 
void RemoveProgressCallback (const ProgressCallback &callback)
 
us::ServiceRegistration< CustomMimeTypeRegisterMimeType (us::ModuleContext *context)
 
void UnregisterMimeType ()
 

Protected Member Functions

 FileReaderWriterBase (const FileReaderWriterBase &other)
 

Protected Attributes

std::string m_Description
 
int m_Ranking
 
std::string m_MimeTypePrefix
 
Options m_Options
 Options supported by this reader. Set sensible default values! More...
 
Options m_DefaultOptions
 
Message1< float > m_ProgressMessage
 
std::unique_ptr< CustomMimeTypem_CustomMimeType
 
us::ServiceRegistration< CustomMimeTypem_MimeTypeReg
 

Detailed Description

Definition at line 27 of file mitkFileReaderWriterBase.h.

Member Typedef Documentation

◆ Options

typedef std::map<std::string, us::Any> mitk::FileReaderWriterBase::Options

Definition at line 30 of file mitkFileReaderWriterBase.h.

◆ ProgressCallback

Constructor & Destructor Documentation

◆ FileReaderWriterBase() [1/2]

mitk::FileReaderWriterBase::FileReaderWriterBase ( )

Definition at line 25 of file mitkFileReaderWriterBase.cpp.

◆ ~FileReaderWriterBase()

mitk::FileReaderWriterBase::~FileReaderWriterBase ( )
virtual

Definition at line 29 of file mitkFileReaderWriterBase.cpp.

References UnregisterMimeType().

◆ FileReaderWriterBase() [2/2]

mitk::FileReaderWriterBase::FileReaderWriterBase ( const FileReaderWriterBase other)
protected

Definition at line 30 of file mitkFileReaderWriterBase.cpp.

Member Function Documentation

◆ AddProgressCallback()

void mitk::FileReaderWriterBase::AddProgressCallback ( const ProgressCallback callback)

Definition at line 138 of file mitkFileReaderWriterBase.cpp.

References m_ProgressMessage.

◆ GetDefaultOptions()

FileReaderWriterBase::Options mitk::FileReaderWriterBase::GetDefaultOptions ( ) const

Definition at line 95 of file mitkFileReaderWriterBase.cpp.

References m_DefaultOptions.

◆ GetDescription()

std::string mitk::FileReaderWriterBase::GetDescription ( ) const

Definition at line 137 of file mitkFileReaderWriterBase.cpp.

References m_Description.

◆ GetMimeType() [1/2]

const CustomMimeType * mitk::FileReaderWriterBase::GetMimeType ( ) const

Definition at line 99 of file mitkFileReaderWriterBase.cpp.

References m_CustomMimeType.

◆ GetMimeType() [2/2]

CustomMimeType * mitk::FileReaderWriterBase::GetMimeType ( )

Definition at line 100 of file mitkFileReaderWriterBase.cpp.

References m_CustomMimeType.

◆ GetMimeTypePrefix()

std::string mitk::FileReaderWriterBase::GetMimeTypePrefix ( ) const

Definition at line 135 of file mitkFileReaderWriterBase.cpp.

References m_MimeTypePrefix.

◆ GetOption()

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

Definition at line 47 of file mitkFileReaderWriterBase.cpp.

References m_DefaultOptions, and m_Options.

◆ GetOptions()

FileReaderWriterBase::Options mitk::FileReaderWriterBase::GetOptions ( ) const

Definition at line 40 of file mitkFileReaderWriterBase.cpp.

References m_DefaultOptions, and m_Options.

◆ GetRanking()

int mitk::FileReaderWriterBase::GetRanking ( ) const

Definition at line 97 of file mitkFileReaderWriterBase.cpp.

References m_Ranking.

◆ GetRegisteredMimeType()

◆ RegisterMimeType()

us::ServiceRegistration< CustomMimeType > mitk::FileReaderWriterBase::RegisterMimeType ( us::ModuleContext *  context)

◆ RemoveProgressCallback()

void mitk::FileReaderWriterBase::RemoveProgressCallback ( const ProgressCallback callback)

Definition at line 143 of file mitkFileReaderWriterBase.cpp.

References m_ProgressMessage.

◆ SetDefaultOptions()

void mitk::FileReaderWriterBase::SetDefaultOptions ( const Options defaultOptions)

Definition at line 90 of file mitkFileReaderWriterBase.cpp.

References m_DefaultOptions.

◆ SetDescription()

void mitk::FileReaderWriterBase::SetDescription ( const std::string &  description)

Definition at line 136 of file mitkFileReaderWriterBase.cpp.

References m_Description.

◆ SetMimeType()

void mitk::FileReaderWriterBase::SetMimeType ( const CustomMimeType mimeType)

Definition at line 98 of file mitkFileReaderWriterBase.cpp.

References mitk::CustomMimeType::Clone(), and m_CustomMimeType.

◆ SetMimeTypePrefix()

void mitk::FileReaderWriterBase::SetMimeTypePrefix ( const std::string &  prefix)

Definition at line 134 of file mitkFileReaderWriterBase.cpp.

References m_MimeTypePrefix.

◆ SetOption()

void mitk::FileReaderWriterBase::SetOption ( const std::string &  name,
const us::Any value 
)

Definition at line 70 of file mitkFileReaderWriterBase.cpp.

References us::Any::Empty(), m_DefaultOptions, m_Options, and MITK_WARN.

Referenced by SetOptions().

◆ SetOptions()

void mitk::FileReaderWriterBase::SetOptions ( const Options options)

Definition at line 62 of file mitkFileReaderWriterBase.cpp.

References SetOption().

◆ SetRanking()

void mitk::FileReaderWriterBase::SetRanking ( int  ranking)

Set the service ranking for this file reader.

Default is zero and should only be chosen differently for a reason. The ranking is used to determine which reader to use if several equivalent readers have been found. It may be used to replace a default reader from MITK in your own project. E.g. if you want to use your own reader for nrrd files instead of the default, implement it and give it a higher ranking than zero.

Definition at line 96 of file mitkFileReaderWriterBase.cpp.

References m_Ranking.

◆ UnregisterMimeType()

void mitk::FileReaderWriterBase::UnregisterMimeType ( )

Definition at line 194 of file mitkFileReaderWriterBase.cpp.

References m_MimeTypeReg.

Referenced by ~FileReaderWriterBase().

Member Data Documentation

◆ m_CustomMimeType

std::unique_ptr<CustomMimeType> mitk::FileReaderWriterBase::m_CustomMimeType
protected

◆ m_DefaultOptions

Options mitk::FileReaderWriterBase::m_DefaultOptions
protected

◆ m_Description

std::string mitk::FileReaderWriterBase::m_Description
protected

Definition at line 79 of file mitkFileReaderWriterBase.h.

Referenced by GetDescription(), and SetDescription().

◆ m_MimeTypePrefix

std::string mitk::FileReaderWriterBase::m_MimeTypePrefix
protected

◆ m_MimeTypeReg

us::ServiceRegistration<CustomMimeType> mitk::FileReaderWriterBase::m_MimeTypeReg
protected

◆ m_Options

Options mitk::FileReaderWriterBase::m_Options
protected

Options supported by this reader. Set sensible default values!

Can be left emtpy if no special options are required.

Definition at line 89 of file mitkFileReaderWriterBase.h.

Referenced by GetOption(), GetOptions(), and SetOption().

◆ m_ProgressMessage

Message1<float> mitk::FileReaderWriterBase::m_ProgressMessage
protected

Definition at line 95 of file mitkFileReaderWriterBase.h.

Referenced by AddProgressCallback(), and RemoveProgressCallback().

◆ m_Ranking

int mitk::FileReaderWriterBase::m_Ranking
protected

Definition at line 80 of file mitkFileReaderWriterBase.h.

Referenced by GetRanking(), and SetRanking().


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