Public Types | Public Member Functions | Static Public Member Functions | List of all members
mirtk::ImageReaderFactory Class Reference

#include <ImageReaderFactory.h>

Collaboration diagram for mirtk::ImageReaderFactory:
Collaboration graph

Public Types

typedef ImageReader *(* ImageReaderCreator) ()
 Type of object creator.
 

Public Member Functions

ImageReaderNew (const char *fname) const
 
bool Register (ImageReaderCreator creator)
 

Static Public Member Functions

static ImageReaderFactoryInstance ()
 

Detailed Description

Factory for instantiation of image readers

Definition at line 34 of file ImageReaderFactory.h.

Member Function Documentation

§ Instance()

static ImageReaderFactory& mirtk::ImageReaderFactory::Instance ( )
static

Singleton instance

Attention
This function is not thread-safe!

§ New()

ImageReader* mirtk::ImageReaderFactory::New ( const char *  fname) const

Construct new image reader for given image file

Parameters
[in]fnameInput image file path/name incl. file name extension.
Returns
First found image reader which is able to read the given image file or nullptr when file cannot be read by any registered reader.

§ Register()

bool mirtk::ImageReaderFactory::Register ( ImageReaderCreator  creator)

Register new object creator

Parameters
[in]creatorObject creator function.

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