Medical Imaging Interaction Toolkit  2024.06.00
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.

Note
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 39 of file mitkFileReaderRegistry.h.

Member Typedef Documentation

◆ ReaderReference

Constructor & Destructor Documentation

◆ FileReaderRegistry()

mitk::FileReaderRegistry::FileReaderRegistry ( )

◆ ~FileReaderRegistry()

mitk::FileReaderRegistry::~FileReaderRegistry ( )

Member Function Documentation

◆ GetMimeTypeForFile()

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

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

Parameters
path
context
Returns
The highest ranked mime-type containing extension in its extension list.

◆ GetReader()

mitk::IFileReader* mitk::FileReaderRegistry::GetReader ( const ReaderReference ref,
us::ModuleContext *  context = us::GetModuleContext() 
)

◆ GetReaders()

std::vector<mitk::IFileReader *> mitk::FileReaderRegistry::GetReaders ( const MimeType mimeType,
us::ModuleContext *  context = us::GetModuleContext() 
)

◆ GetReferences()

static std::vector<ReaderReference> mitk::FileReaderRegistry::GetReferences ( const MimeType mimeType,
us::ModuleContext *  context = us::GetModuleContext() 
)
static

◆ UngetReader()

void mitk::FileReaderRegistry::UngetReader ( mitk::IFileReader reader)

◆ UngetReaders()

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

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