Write an I O plugin - abria/TeraStitcher GitHub Wiki
To implement an I/O plugin named new_plugin
to support new image file formats, a derived class of the following abstract classes have to be written and placed in the directory src/iomanager/plugins/new_plugin. Besides the .cpp
file containing abstract methods implementation, a .h
file must be added containing the following code:
#ifndef _newplugin_FORMAT_H
#define _newplugin_FORMAT_H
#include "../../IOPluginAPI.h"
TERASTITCHER_CREATE_IO_PLUGIN_3D(newplugin)
#endif // _newplugin_FORMAT_H
To implement a 2D plugin, i.e. a plugin supporting formats for 2D images, you have to implement the following abstract interface defined by the iomanager::IOPlugin2D
class contained in the src/iomanager/IOPluginAPI.h file.
Similarly, to implement a 3D plugin, you have to implement the interface defined by the iomanager::IOPlugin3D
class.
Both 2D and 3D I/O plugins can be either input-only plugins or truly input/output plugins. The formers have an empty implementation of the output methods.