Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::FileReaderRegistry Class Reference

#include <mitkFileReaderRegistry.h>

Public Types

typedef us::ServiceReference< IFileReaderReaderReference

Public Member Functions

 FileReaderRegistry ()
 ~FileReaderRegistry ()
mitk::IFileReaderGetReader (const ReaderReference &ref, us::ModuleContext *context=us::GetModuleContext())
std::vector< mitk::IFileReader * > GetReaders (const MimeType &mimeType, us::ModuleContext *context=us::GetModuleContext())
void UngetReader (mitk::IFileReader *reader)
void UngetReaders (const std::vector< mitk::IFileReader * > &readers)

Static Public Member Functions

static MimeType GetMimeTypeForFile (const std::string &path, us::ModuleContext *context=us::GetModuleContext())
 Get the highest ranked mime-type for the given file name. More...
static std::vector< ReaderReferenceGetReferences (const MimeType &mimeType, us::ModuleContext *context=us::GetModuleContext())

Detailed Description

Provides convenient access to mitk::IFileReader instances and reading files into mitk::BaseData types.

The life-time of all mitk::IFileReader objects returned by an instance of this class ends with the destruction of that instance.

Definition at line 43 of file mitkFileReaderRegistry.h.

Member Typedef Documentation

Constructor & Destructor Documentation

mitk::FileReaderRegistry::FileReaderRegistry ( )

Definition at line 30 of file mitkFileReaderRegistry.cpp.

mitk::FileReaderRegistry::~FileReaderRegistry ( )

Definition at line 34 of file mitkFileReaderRegistry.cpp.

Member Function Documentation

mitk::MimeType mitk::FileReaderRegistry::GetMimeTypeForFile ( const std::string &  path,
us::ModuleContext *  context = us::GetModuleContext() 

Get the highest ranked mime-type for the given file name.

extensionA file name extension without a leading dot.
The highest ranked mime-type containing extension in its extension list.

Definition at line 42 of file mitkFileReaderRegistry.cpp.

References mitk::CoreServices::GetMimeTypeProvider(), mitk::IMimeTypeProvider::GetMimeTypesForFile(), and mitkThrow.

Referenced by mitkPointSetReaderTest().

mitk::IFileReader * mitk::FileReaderRegistry::GetReader ( const ReaderReference ref,
us::ModuleContext *  context = us::GetModuleContext() 
std::vector< mitk::IFileReader * > mitk::FileReaderRegistry::GetReaders ( const MimeType mimeType,
us::ModuleContext *  context = us::GetModuleContext() 
std::vector< mitk::FileReaderRegistry::ReaderReference > mitk::FileReaderRegistry::GetReferences ( const MimeType mimeType,
us::ModuleContext *  context = us::GetModuleContext() 
void mitk::FileReaderRegistry::UngetReader ( mitk::IFileReader reader)

Definition at line 115 of file mitkFileReaderRegistry.cpp.

void mitk::FileReaderRegistry::UngetReaders ( const std::vector< mitk::IFileReader * > &  readers)

Definition at line 126 of file mitkFileReaderRegistry.cpp.

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