Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::IFileIO Struct Referenceabstract

Common interface for all MITK file reader and writer. More...

#include <mitkIFileIO.h>

Inheritance diagram for mitk::IFileIO:

Public Types

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::AnyOptions
 Options for reading or writing data. More...
 
typedef mitk::MessageAbstractDelegate1< float > ProgressCallback
 

Public Member Functions

virtual ~IFileIO ()
 
virtual ConfidenceLevel GetConfidenceLevel () const =0
 The confidence level of the reader or writer implementation. More...
 
virtual Options GetOptions () const =0
 returns a list of the supported options More...
 
virtual us::Any GetOption (const std::string &name) const =0
 
virtual void SetOptions (const Options &options)=0
 
virtual void SetOption (const std::string &name, const us::Any &value)=0
 
virtual void AddProgressCallback (const ProgressCallback &callback)=0
 
virtual void RemoveProgressCallback (const ProgressCallback &callback)=0
 

Static Public Member Functions

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...
 

Detailed Description

Common interface for all MITK file reader and writer.

This interface is not meant to be implemented directly. It is inherited from IFileWriter and IFileReader and a default implementation is provided in AbstractFileIO via AbstractFileWriter and AbstractFileReader.

Definition at line 39 of file mitkIFileIO.h.

Member Typedef Documentation

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

Options for reading or writing data.

Options are used in reader or writer implementations to customize certain aspects of the reading/writing process. Options may be supplied by users calling the SetOption() method or they may be presented as an input mask in the context of a graphical user interface.

The keys are human-readable labels and the type of the option value specifies the user interface representation. If a key contains multiple segments (sub-strings separated by a '.' character, only the last segment is displayed. If the last segment is equal to the string 'enum', the option is treated as a finite enumeration of values where the values are contained in a corresponding std::vector<std::string> value. the same option key without the 'enum' segment is considered to hold the current selection from the enumeration.

Definition at line 73 of file mitkIFileIO.h.

Constructor & Destructor Documentation

mitk::IFileIO::~IFileIO ( )
virtual

Definition at line 21 of file mitkIFileIO.cpp.

Member Function Documentation

virtual void mitk::IFileIO::AddProgressCallback ( const ProgressCallback callback)
pure virtual
virtual us::Any mitk::IFileIO::GetOption ( const std::string &  name) const
pure virtual
virtual Options mitk::IFileIO::GetOptions ( ) const
pure virtual

returns a list of the supported options

Options are strings that are treated as flags when passed to the write method.

Implemented in mitk::AbstractFileWriter, and mitk::AbstractFileReader.

Referenced by mitk::IOUtil::Save().

std::string mitk::IFileIO::PROP_DESCRIPTION ( )
static

Service property name for a description.

The property value must be of type std::string.

Returns
The property name.

Definition at line 22 of file mitkIFileIO.cpp.

Referenced by mitk::FileReaderSelector::Item::GetDescription(), mitk::FileWriterSelector::Item::GetDescription(), mitk::AbstractFileReader::GetServiceProperties(), and mitk::AbstractFileWriter::GetServiceProperties().

std::string mitk::IFileIO::PROP_MIMETYPE ( )
static

Service property name for the mime-type associated with this file writer.

The property value must be of type std::string.

Returns
The property name.

Definition at line 28 of file mitkIFileIO.cpp.

Referenced by mitk::FileWriterSelector::FileWriterSelector(), mitk::FileWriterRegistry::GetReferences(), mitk::FileReaderRegistry::GetReferences(), mitk::AbstractFileReader::GetServiceProperties(), and mitk::AbstractFileWriter::GetServiceProperties().

virtual void mitk::IFileIO::RemoveProgressCallback ( const ProgressCallback callback)
pure virtual
virtual void mitk::IFileIO::SetOption ( const std::string &  name,
const us::Any value 
)
pure virtual
virtual void mitk::IFileIO::SetOptions ( const Options options)
pure virtual

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