Medical Imaging Interaction Toolkit  2016.11.0
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 31 of file mitkFileReaderWriterBase.h.

Member Typedef Documentation

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

Definition at line 34 of file mitkFileReaderWriterBase.h.

Constructor & Destructor Documentation

mitk::FileReaderWriterBase::FileReaderWriterBase ( )

Definition at line 29 of file mitkFileReaderWriterBase.cpp.

mitk::FileReaderWriterBase::~FileReaderWriterBase ( )
virtual

Definition at line 33 of file mitkFileReaderWriterBase.cpp.

References UnregisterMimeType().

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

Definition at line 34 of file mitkFileReaderWriterBase.cpp.

Member Function Documentation

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

Definition at line 142 of file mitkFileReaderWriterBase.cpp.

References m_ProgressMessage.

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

Definition at line 99 of file mitkFileReaderWriterBase.cpp.

References m_DefaultOptions.

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

Definition at line 141 of file mitkFileReaderWriterBase.cpp.

References m_Description.

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

Definition at line 103 of file mitkFileReaderWriterBase.cpp.

References m_CustomMimeType.

CustomMimeType * mitk::FileReaderWriterBase::GetMimeType ( )

Definition at line 104 of file mitkFileReaderWriterBase.cpp.

References m_CustomMimeType.

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

Definition at line 139 of file mitkFileReaderWriterBase.cpp.

References m_MimeTypePrefix.

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

Definition at line 51 of file mitkFileReaderWriterBase.cpp.

References m_DefaultOptions, and m_Options.

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

Definition at line 44 of file mitkFileReaderWriterBase.cpp.

References m_DefaultOptions, and m_Options.

int mitk::FileReaderWriterBase::GetRanking ( ) const

Definition at line 101 of file mitkFileReaderWriterBase.cpp.

References m_Ranking.

us::ServiceRegistration< CustomMimeType > mitk::FileReaderWriterBase::RegisterMimeType ( us::ModuleContext *  context)
void mitk::FileReaderWriterBase::RemoveProgressCallback ( const ProgressCallback callback)

Definition at line 147 of file mitkFileReaderWriterBase.cpp.

References m_ProgressMessage.

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

Definition at line 94 of file mitkFileReaderWriterBase.cpp.

References m_DefaultOptions.

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

Definition at line 140 of file mitkFileReaderWriterBase.cpp.

References m_Description.

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

Definition at line 138 of file mitkFileReaderWriterBase.cpp.

References m_MimeTypePrefix.

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

Definition at line 74 of file mitkFileReaderWriterBase.cpp.

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

Referenced by SetOptions().

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

Definition at line 66 of file mitkFileReaderWriterBase.cpp.

References SetOption().

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 100 of file mitkFileReaderWriterBase.cpp.

References m_Ranking.

void mitk::FileReaderWriterBase::UnregisterMimeType ( )

Definition at line 198 of file mitkFileReaderWriterBase.cpp.

References m_MimeTypeReg.

Referenced by ~FileReaderWriterBase().

Member Data Documentation

std::unique_ptr<CustomMimeType> mitk::FileReaderWriterBase::m_CustomMimeType
protected
Options mitk::FileReaderWriterBase::m_DefaultOptions
protected
std::string mitk::FileReaderWriterBase::m_Description
protected

Definition at line 83 of file mitkFileReaderWriterBase.h.

Referenced by GetDescription(), and SetDescription().

std::string mitk::FileReaderWriterBase::m_MimeTypePrefix
protected
us::ServiceRegistration<CustomMimeType> mitk::FileReaderWriterBase::m_MimeTypeReg
protected
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 93 of file mitkFileReaderWriterBase.h.

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

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

Definition at line 99 of file mitkFileReaderWriterBase.h.

Referenced by AddProgressCallback(), and RemoveProgressCallback().

int mitk::FileReaderWriterBase::m_Ranking
protected

Definition at line 84 of file mitkFileReaderWriterBase.h.

Referenced by GetRanking(), and SetRanking().


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