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

#include <ImageWriterFactory.h>

Collaboration diagram for mirtk::ImageWriterFactory:
Collaboration graph

Public Types

typedef ImageWriter *(* ImageWriterCreator) ()
 Type of object creator.
 

Public Member Functions

ImageWriterNew (const char *fname) const
 
bool Register (const Array< string > &exts, ImageWriterCreator creator)
 

Static Public Member Functions

static ImageWriterFactoryInstance ()
 

Detailed Description

Factory for instantiation of image writers

Definition at line 37 of file ImageWriterFactory.h.

Member Function Documentation

§ Instance()

static ImageWriterFactory& mirtk::ImageWriterFactory::Instance ( )
static

Singleton instance

Attention
This function is not thread-safe!

§ New()

ImageWriter* mirtk::ImageWriterFactory::New ( const char *  fname) const

Construct new image writer for given output image file name

Returns
Image writer which is able to write an image in the format corresponding to the given file name extension or nullptr when no such writer is registered.

§ Register()

bool mirtk::ImageWriterFactory::Register ( const Array< string > &  exts,
ImageWriterCreator  creator 
)

Register new image writer

Parameters
[in]extsFile name extensions.
[in]creatorImage writer instantiation function.

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