Input/output of files

Input and output of images. More...

Data Structures

class  C2DIOVectorfield
 a class for the IO of 2D vector fields More...
 
class  C2DTransformIOPluginHandlerImpl
 The non-singleton plug-in handler for 3D transformations. More...
 
class  C3DImageVector
 A class to interface images with image IO plugins. More...
 
class  C3DIOVectorfield
 An interface class to wrap a vector field into something, IO plugins can understand. More...
 
class  C3DTransformIOPluginHandlerImpl
 The non-singleton plug-in handler for 3D transformations. More...
 
class  CDatapool
 temporary data storage to avoid storing on disk More...
 
class  CFile
 A wrapper for the cstdio file type that closes the file automatically when the scope is left. More...
 
class  CInputFile
 A stdio FILE for opening a file for reading. More...
 
class  CIOData
 helper class to derive from for data that can be loaded and stored to a disk. More...
 
class  COutputFile
 A stdio FILE for opening a file for writing. More...
 

Typedefs

typedef THandlerSingleton< C2DImageIOPPH > C2DImageIOPluginHandler
 
typedef C2DRGBImageIOPluginPluginHandler::Instance::DataKey C2DRGBImageDataKey
 The data key type for the CDatapool storage. More...
 
typedef mia::THandlerSingleton< mia::TIOPluginHandler< C2DRGBImageIOPlugin > > C2DRGBImageIOPluginPluginHandler
 The 2D RGB image plugin handler. More...
 
typedef C2DTransformationIOPluginHandler::Instance::DataKey C2DTransformationDataKey
 The data key type for the CDatapool storage. More...
 
typedef TIOPlugin< C2DTransformationC2DTransformationIO
 The base class for 2D transformation IO plugins. More...
 
typedef THandlerSingleton< C2DTransformIOPluginHandlerImplC2DTransformationIOPluginHandler
 The 2D transformationb plugin handler. More...
 
typedef C3DImageIOPluginHandler::Instance::DataKey C3DImageDataKey
 Data key type used to load and store to the CDatapool. More...
 
typedef TIOPlugin< io_3dimage_dataC3DImageIOPlugin
 The 3D image io plugin base class. More...
 
typedef THandlerSingleton< TIOPluginHandler< C3DImageIOPlugin > > C3DImageIOPluginHandler
 Handler for the plug-ins that store and load 3D images. More...
 
typedef C3DLandmarklistIOPluginHandler::Instance::DataKey C3DLandmarklistDataKey
 3D Landmark list data key to load and store to the CDatapool More...
 
typedef TIOPlugin< C3DLandmarklistC3DLandmarklistIOPlugin
 3D Landmark list IO plugin base More...
 
typedef THandlerSingleton< TIOPluginHandler< C3DLandmarklistIOPlugin > > C3DLandmarklistIOPluginHandler
 3D Landmark list IO plugin handler More...
 
typedef C3DTransformationIOPluginHandler::Instance::DataKey C3DTransformationDataKey
 data key type for temporary storage of 3D transformations More...
 
typedef TIOPlugin< C3DTransformationC3DTransformationIO
 Base class for the generic IO of transformations. More...
 
typedef THandlerSingleton< C3DTransformIOPluginHandlerImplC3DTransformationIOPluginHandler
 Plug-in handler for the transformation IO plug-ins. More...
 
typedef TTransformCreator< C3DTransformationC3DTransformCreator
 base class for the creators of 3D transformations More...
 
typedef THandlerSingleton< TFactoryPluginHandler< C3DTransformCreatorPlugin > > C3DTransformCreatorHandler
 Transform creator plugin handler. More...
 
typedef TTransformCreatorPlugin< C3DTransformationC3DTransformCreatorPlugin
 Base class for the transform creator plugins. More...
 
typedef TIOPlugin< C3DIOVectorfieldC3DVFIOPlugin
 Base class for vector field IO plug-ins. More...
 
typedef THandlerSingleton< TIOPluginHandler< C3DVFIOPlugin > > C3DVFIOPluginHandler
 Plug-in handler for vector field IO. More...
 
typedef C3DImageIOPluginHandler::Instance::PData P3DImageVector
 pointer type to the images More...
 
typedef std::shared_ptr< C3DTransformCreatorP3DTransformationFactory
 pointer type of the class for the creators of 3D transformations More...
 

Functions

P2DTransformation load_2dtransform (const std::string &file)
 convenienance function to load a transformation More...
 
P3DTransformation load_3dtransform (const std::string &file)
 convenienance function to load a transformation More...
 
P2DImage EXPORT_2D load_image2d (const std::string &filename)
 
P3DImage EXPORT_3D load_image3d (const std::string &filename)
 
template<>
P2DImage load_image< P2DImage > (const std::string &filename)
 
template<>
P3DImage EXPORT_3D load_image< P3DImage > (const std::string &filename)
 
C2DImageGroupedSeries EXPORT_2D load_image_series (const std::vector< std::string > &filenames, CProgressCallback *cb=NULL)
 
template<typename T >
load_transform (const std::string &file)
 template to unify transformation loading More...
 
template<>
P2DTransformation load_transform< P2DTransformation > (const std::string &file)
 specialized version to load a transformation More...
 
template<>
P3DTransformation load_transform< P3DTransformation > (const std::string &file)
 specialized version to load a transformation More...
 
bool EXPORT_3D save_image (const std::string &filename, P3DImage image)
 
bool EXPORT_3D save_image (const std::string &filename, C3DImage &image)
 
bool EXPORT_2D save_image (const std::string &filename, P2DImage image)
 
bool EXPORT_2D save_image (const std::string &filename, C2DImage &image)
 
bool save_transform (const std::string &file, const C3DTransformation &transform)
 convenienance function to save a transformation More...
 
bool save_transform (const std::string &file, const C2DTransformation &transform)
 convenienance function to save a transformation More...
 

Detailed Description

Input and output of images.

Typedef Documentation

◆ C2DImageIOPluginHandler

typedef THandlerSingleton< C2DImageIOPPH > C2DImageIOPluginHandler

The 2D image IO plugin handler that also provides the interface to load and store 2D images.

Definition at line 84 of file 2d/imageio.hh.

◆ C2DRGBImageDataKey

typedef C2DRGBImageIOPluginPluginHandler::Instance::DataKey C2DRGBImageDataKey

The data key type for the CDatapool storage.

Definition at line 100 of file rgbimageio.hh.

◆ C2DRGBImageIOPluginPluginHandler

typedef mia::THandlerSingleton< mia::TIOPluginHandler<C2DRGBImageIOPlugin> > C2DRGBImageIOPluginPluginHandler

The 2D RGB image plugin handler.

Definition at line 94 of file rgbimageio.hh.

◆ C2DTransformationDataKey

typedef C2DTransformationIOPluginHandler::Instance::DataKey C2DTransformationDataKey

The data key type for the CDatapool storage.

Definition at line 65 of file 2d/transformio.hh.

◆ C2DTransformationIO

The base class for 2D transformation IO plugins.

Definition at line 38 of file 2d/transformio.hh.

◆ C2DTransformationIOPluginHandler

The 2D transformationb plugin handler.

Definition at line 59 of file 2d/transformio.hh.

◆ C3DImageDataKey

typedef C3DImageIOPluginHandler::Instance::DataKey C3DImageDataKey

Data key type used to load and store to the CDatapool.

Definition at line 74 of file 3d/imageio.hh.

◆ C3DImageIOPlugin

The 3D image io plugin base class.

Definition at line 53 of file 3d/imageio.hh.

◆ C3DImageIOPluginHandler

Handler for the plug-ins that store and load 3D images.

Definition at line 62 of file 3d/imageio.hh.

◆ C3DLandmarklistDataKey

typedef C3DLandmarklistIOPluginHandler::Instance::DataKey C3DLandmarklistDataKey

3D Landmark list data key to load and store to the CDatapool

Definition at line 60 of file landmarklistio.hh.

◆ C3DLandmarklistIOPlugin

3D Landmark list IO plugin base

Definition at line 34 of file landmarklistio.hh.

◆ C3DLandmarklistIOPluginHandler

3D Landmark list IO plugin handler

Definition at line 54 of file landmarklistio.hh.

◆ C3DTransformationDataKey

typedef C3DTransformationIOPluginHandler::Instance::DataKey C3DTransformationDataKey

data key type for temporary storage of 3D transformations

See also
CDatapool

Definition at line 61 of file 3d/transformio.hh.

◆ C3DTransformationIO

Base class for the generic IO of transformations.

Definition at line 34 of file 3d/transformio.hh.

◆ C3DTransformationIOPluginHandler

Plug-in handler for the transformation IO plug-ins.

Definition at line 55 of file 3d/transformio.hh.

◆ C3DTransformCreator

base class for the creators of 3D transformations

Todo:
rename this to factory

Definition at line 35 of file 3d/transformfactory.hh.

◆ C3DTransformCreatorHandler

Transform creator plugin handler.

Definition at line 53 of file 3d/transformfactory.hh.

◆ C3DTransformCreatorPlugin

Base class for the transform creator plugins.

Definition at line 47 of file 3d/transformfactory.hh.

◆ C3DVFIOPlugin

Base class for vector field IO plug-ins.

Definition at line 63 of file 3d/vfio.hh.

◆ C3DVFIOPluginHandler

Plug-in handler for vector field IO.

Definition at line 75 of file 3d/vfio.hh.

◆ P3DImageVector

typedef C3DImageIOPluginHandler::Instance::PData P3DImageVector

pointer type to the images

Definition at line 80 of file 3d/imageio.hh.

◆ P3DTransformationFactory

typedef std::shared_ptr<C3DTransformCreator > P3DTransformationFactory

pointer type of the class for the creators of 3D transformations

Definition at line 41 of file 3d/transformfactory.hh.

Function Documentation

◆ load_2dtransform()

P2DTransformation load_2dtransform ( const std::string &  file)
inline

convenienance function to load a transformation

Parameters
filefile name to load the transformation from
Returns
the loaded transformation or an empty std::shared_ptr

Definition at line 74 of file 2d/transformio.hh.

References THandlerSingleton< T >::instance().

Referenced by load_transform< P2DTransformation >().

◆ load_3dtransform()

P3DTransformation load_3dtransform ( const std::string &  file)
inline

convenienance function to load a transformation

Parameters
filefile name to load the transformation from
Returns
the loaded transformation or an empty std::shared_ptr

Definition at line 70 of file 3d/transformio.hh.

References THandlerSingleton< T >::instance().

Referenced by load_transform< P3DTransformation >().

◆ load_image2d()

P2DImage EXPORT_2D load_image2d ( const std::string &  filename)

Convenience function to load one 2D image from a file

Parameters
filename
Returns
image

Referenced by load_image< P2DImage >().

◆ load_image3d()

P3DImage EXPORT_3D load_image3d ( const std::string &  filename)

convenience function to load a single image from a file.

Exceptions
std::invalid_argumentif the image could not be loaded
Parameters
filenameinput file
Returns
the loaded image

Referenced by load_image< P3DImage >().

◆ load_image< P2DImage >()

template<>
P2DImage load_image< P2DImage > ( const std::string &  filename)
inline

Convenience function to load one 2D image from a file

Parameters
filename
Returns
image

Definition at line 130 of file 2d/imageio.hh.

References EXPORT_2D, load_image2d(), load_image_series(), NS_MIA_END, and save_image().

◆ load_image< P3DImage >()

template<>
P3DImage EXPORT_3D load_image< P3DImage > ( const std::string &  filename)
inline

convenience function to load a single image from a file.

Exceptions
std::invalid_argumentif the image could not be loaded
Parameters
filenameinput file
Returns
the loaded image

Definition at line 109 of file 3d/imageio.hh.

References cvdebug(), EXPORT_3D, load_image3d(), NS_MIA_END, and save_image().

◆ load_image_series()

C2DImageGroupedSeries EXPORT_2D load_image_series ( const std::vector< std::string > &  filenames,
CProgressCallback cb = NULL 
)

Convenience function to load a series of images and group them into sets based on the acquisition parameters if available. If these parameters are not available, then the order of the input files is used to sort the files but no grouping takes place.

Parameters
filenameslist of file names
cboptionally provide a call back function that shows loading progress
Returns
grouped set of files.

Referenced by load_image< P2DImage >().

◆ load_transform()

template<typename T >
T load_transform ( const std::string &  file)

template to unify transformation loading

Template Parameters
Tthe type of the transformation to be loaded
Parameters
filethe file name of the transformation to be loaded
Returns
the loaded transformation or an empty shared:ptr

Definition at line 120 of file transformation.hh.

◆ load_transform< P2DTransformation >()

template<>
P2DTransformation load_transform< P2DTransformation > ( const std::string &  file)
inline

specialized version to load a transformation

Parameters
filefile name to load the transformation from
Returns
the loaded transformation or an empty std::shared_ptr

Definition at line 86 of file 2d/transformio.hh.

References load_2dtransform().

◆ load_transform< P3DTransformation >()

template<>
P3DTransformation load_transform< P3DTransformation > ( const std::string &  file)
inline

specialized version to load a transformation

Parameters
filefile name to load the transformation from
Returns
the loaded transformation or an empty std::shared_ptr

Definition at line 82 of file 3d/transformio.hh.

References load_3dtransform().

◆ save_image() [1/4]

bool EXPORT_3D save_image ( const std::string &  filename,
P3DImage  image 
)

convenience function to save a single image to a file.

Parameters
filenameinput file
imageimage to be saved
Returns
true if successful and false otherwise

Referenced by load_image< P3DImage >().

◆ save_image() [2/4]

bool EXPORT_3D save_image ( const std::string &  filename,
C3DImage image 
)

Convenience function to save one 3D image to a file

Parameters
filename
image
Returns
true if saving was successfull

◆ save_image() [3/4]

bool EXPORT_2D save_image ( const std::string &  filename,
P2DImage  image 
)

Convenience function to save one 2D image to a file

Parameters
filename
image
Returns
true if saving was successfull

Referenced by load_image< P2DImage >().

◆ save_image() [4/4]

bool EXPORT_2D save_image ( const std::string &  filename,
C2DImage image 
)

Convenience function to save one 2D image to a file

Parameters
filename
image
Returns
true if saving was successfull

◆ save_transform() [1/2]

bool save_transform ( const std::string &  file,
const C3DTransformation transform 
)
inline

convenienance function to save a transformation

Parameters
filefile name to store the transformation in
transformthe transformation to be stored

Definition at line 94 of file 3d/transformio.hh.

References THandlerSingleton< T >::instance(), and NS_MIA_END.

◆ save_transform() [2/2]

bool save_transform ( const std::string &  file,
const C2DTransformation transform 
)
inline

convenienance function to save a transformation

Parameters
filefile name to store the transformation in
transformthe transformation to be stored

Definition at line 98 of file 2d/transformio.hh.

References THandlerSingleton< T >::instance(), and NS_MIA_END.