Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <mitkFileReaderWriterBase.h>
Public Types | |
typedef std::map< std::string, us::Any > | Options |
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 CustomMimeType * | GetMimeType () const |
CustomMimeType * | GetMimeType () |
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< CustomMimeType > | RegisterMimeType (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< CustomMimeType > | m_CustomMimeType |
us::ServiceRegistration< CustomMimeType > | m_MimeTypeReg |
Definition at line 31 of file mitkFileReaderWriterBase.h.
typedef std::map<std::string, us::Any> mitk::FileReaderWriterBase::Options |
Definition at line 34 of file mitkFileReaderWriterBase.h.
Definition at line 35 of file mitkFileReaderWriterBase.h.
mitk::FileReaderWriterBase::FileReaderWriterBase | ( | ) |
Definition at line 29 of file mitkFileReaderWriterBase.cpp.
|
virtual |
Definition at line 33 of file mitkFileReaderWriterBase.cpp.
References UnregisterMimeType().
|
protected |
Definition at line 34 of file mitkFileReaderWriterBase.cpp.
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.
MimeType mitk::FileReaderWriterBase::GetRegisteredMimeType | ( | ) | const |
Definition at line 105 of file mitkFileReaderWriterBase.cpp.
References us::any_cast(), us::Any::Empty(), mitk::CoreServices::GetMimeTypeProvider(), us::GetModuleContext(), m_CustomMimeType, m_MimeTypeReg, MITK_WARN, us::ServiceConstants::SERVICE_ID(), us::ServiceConstants::SERVICE_RANKING(), and us::BadAnyCastException::what().
us::ServiceRegistration< CustomMimeType > mitk::FileReaderWriterBase::RegisterMimeType | ( | us::ModuleContext * | context | ) |
Definition at line 152 of file mitkFileReaderWriterBase.cpp.
References mitk::CoreServices::GetMimeTypeProvider(), m_CustomMimeType, m_MimeTypePrefix, m_MimeTypeReg, and MITK_WARN.
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 | ) |
Definition at line 102 of file mitkFileReaderWriterBase.cpp.
References mitk::CustomMimeType::Clone(), and m_CustomMimeType.
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().
|
protected |
Definition at line 101 of file mitkFileReaderWriterBase.h.
Referenced by GetMimeType(), GetRegisteredMimeType(), RegisterMimeType(), and SetMimeType().
|
protected |
Definition at line 95 of file mitkFileReaderWriterBase.h.
Referenced by GetDefaultOptions(), GetOption(), GetOptions(), SetDefaultOptions(), and SetOption().
|
protected |
Definition at line 83 of file mitkFileReaderWriterBase.h.
Referenced by GetDescription(), and SetDescription().
|
protected |
Definition at line 86 of file mitkFileReaderWriterBase.h.
Referenced by GetMimeTypePrefix(), RegisterMimeType(), and SetMimeTypePrefix().
|
protected |
Definition at line 102 of file mitkFileReaderWriterBase.h.
Referenced by GetRegisteredMimeType(), RegisterMimeType(), and UnregisterMimeType().
|
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().
|
protected |
Definition at line 99 of file mitkFileReaderWriterBase.h.
Referenced by AddProgressCallback(), and RemoveProgressCallback().
|
protected |
Definition at line 84 of file mitkFileReaderWriterBase.h.
Referenced by GetRanking(), and SetRanking().