soma-io
5.0.5
|
ImageWriter is a low level Image writer. More...
#include <soma-io/image/imagewriter.h>
Public Member Functions | |
ImageWriter () | |
virtual | ~ImageWriter () |
virtual void | write (const T *source, DataSourceInfo &dsi, const std::vector< int > &pos, const std::vector< int > &size, const std::vector< long > &strides, carto::Object options=carto::none()) |
Reading a region of a Image/Volume at a given resolution to a pre-allocated buffer. More... | |
virtual DataSourceInfo | writeHeader (DataSourceInfo &dsi, const T *source, const std::vector< int > &pos, const std::vector< int > &size, const std::vector< long > &strides, carto::Object options=carto::none()) |
This function is called before the actual writing by a FormatWriter. More... | |
virtual void | updateParams (DataSourceInfo &dsi) |
Abstract : set specialized ImageWriter's parameters. More... | |
virtual void | resetParams () |
Abstract : empty specialized ImageWriter's parameters. More... | |
ImageWriter is a low level Image writer.
ImageWriter is a base class for writers of data of type "volume of
voxels" ( 2D or 3D plus a temporal dimension ).
Format-specific writers ( GIS, Dicom, ... ) are derived from it. They may allow partial reading if implemented, or any other specific option (multiresolution, ...)..
Definition at line 56 of file imagewriter.h.
soma::ImageWriter< T >::ImageWriter | ( | ) |
Definition at line 66 of file imagewriter_d.h.
|
virtual |
Definition at line 71 of file imagewriter_d.h.
|
virtual |
Abstract : empty specialized ImageWriter's parameters.
Definition at line 58 of file imagewriter_d.h.
|
virtual |
Abstract : set specialized ImageWriter's parameters.
Definition at line 53 of file imagewriter_d.h.
|
virtual |
Reading a region of a Image/Volume at a given resolution to a pre-allocated buffer.
Positions are expressed in 4D (x,y,z,t). If one or more of these dimensions are of no interest for the format, they take the value 0 ( pos ) or 1 ( size )
source | Buffer containing the region to write. It must be of length size[0]*size[1]*size[2]*size[3]*sizeof(T). A NULL pointer is allowed here, and means that data is unallocated in memory. In such a case, the writer will write the correct amount of zero data. |
pos | Position of the first voxel of the region to write. |
size | Size of the region to write. |
strides | Offsets between voxels in each direction. |
options | Communicates info to the writer (for example, enabling of partial writing). |
Definition at line 83 of file imagewriter_d.h.
References soma::DataSourceList::dataSource(), soma::DataSourceInfo::list(), and soma::DataSource::url().
|
virtual |
This function is called before the actual writing by a FormatWriter.
It builds dsi's DataSourceList and writes the header if any is needed. Image data is also passed because some formats may make use of it to build some specific header information (like scale factors).
Definition at line 96 of file imagewriter_d.h.
References soma::DataSourceList::dataSource(), soma::DataSourceInfo::list(), and soma::DataSource::url().