cartodata  5.1.2
soma::VolumeFormatReader< T > Class Template Reference

FormatReader specialized for 4D Volume. More...

#include <cartodata/io/volumeformatreader.h>

Inheritance diagram for soma::VolumeFormatReader< T >:
Collaboration diagram for soma::VolumeFormatReader< T >:

Public Member Functions

virtual ~VolumeFormatReader ()
 
virtual void read (carto::Volume< T > &obj, carto::rc_ptr< DataSourceInfo > dsi, const AllocatorContext &context, carto::Object options=carto::none())
 FormatReader derived function This method understands a volume and calls read( buffer ) with appropriate arguments. More...
 
void attach (carto::rc_ptr< ImageReader< T > > imr)
 Linking to a ImageReader Allows us to declare only once the ImageReader. More...
 
virtual Volume< T > * createAndRead (carto::rc_ptr< DataSourceInfo > dsi, const AllocatorContext &context, carto::Object options)
 Factory mode: creates an object and reads it. More...
 
virtual void setupAndRead (Volume< T > &obj, carto::rc_ptr< DataSourceInfo > dsi, const AllocatorContext &context, carto::Object options)
 Full reading procedure, for an already existing object. More...
 
virtual FormatReader< carto::Volume< T > > * clone () const
 
virtual std::string formatID () const
 
- Public Member Functions inherited from soma::FormatReader< carto::Volume< T > >
virtual ~FormatReader ()
 
virtual void setupAndRead (T &obj, carto::rc_ptr< DataSourceInfo > dsi, const AllocatorContext &context, carto::Object options)
 
virtual void read (T &obj, carto::rc_ptr< DataSourceInfo > dsi, const AllocatorContext &context, carto::Object options)
 
virtual carto::rc_ptr< DataSourceInfocheckDataSourceInfo (carto::rc_ptr< DataSourceInfo > dsi, carto::Object options)
 
virtual T * create (carto::Object header, const AllocatorContext &context, carto::Object options)
 
virtual void setup (T &obj, carto::Object header, const AllocatorContext &context, carto::Object options)
 

Protected Attributes

carto::rc_ptr< ImageReader< T > > _imr
 

Detailed Description

template<typename T>
class soma::VolumeFormatReader< T >

FormatReader specialized for 4D Volume.

A such VolumeFormatReader needs to be linked to a specialized ImageReader before being registered into a FormatDictionary.
It understands the Volume and detects specific cases (borders, partial reading, ...) before performing the reading through its linked ImageReader.
The parameters for partial reading or borders may be given through the filename, at creation of the Reader.

See also
Reader FileUtil
Note
Parameters currently availables (GIS or OpenSlide) are :
  • (int) ox, oy, oz, ot : top left position of partial frame.
  • (int) sx, sy, sz, st : size of partial frame.
  • (int) bx, by, bz : size of borders.
Is also possible to give any classical option as :
  • (int) resolution_level : level to read (OpenSlide).
  • (bool) unallocated : if volume shouldn't be allocated.
  • (bool) partial_reading : if view is an allocated partial view to an unallocated volume (GIS or OpenSlide).

Definition at line 81 of file volumeformatreader.h.

Constructor & Destructor Documentation

◆ ~VolumeFormatReader()

template<typename T >
soma::VolumeFormatReader< T >::~VolumeFormatReader
virtual

Definition at line 77 of file volumeformatreader_d.h.

Member Function Documentation

◆ attach()

◆ clone()

template<typename T >
FormatReader< carto::Volume< T > > * soma::VolumeFormatReader< T >::clone
virtual

◆ createAndRead()

template<typename T >
Volume< T > * soma::VolumeFormatReader< T >::createAndRead ( carto::rc_ptr< DataSourceInfo dsi,
const AllocatorContext context,
carto::Object  options 
)
virtual

Factory mode: creates an object and reads it.

The returned object belongs to the calling layer and may be deleted by the standard delete

Reimplemented from soma::FormatReader< carto::Volume< T > >.

Definition at line 146 of file volumeformatreader_d.h.

References rc_ptr< GenericObject >::get(), soma::VolumeUtilIO< T >::listReadProperties(), localMsg, soma::VolumeUtilIO< T >::read(), carto::Object::reference(), carto::rc_ptr< class >::reset(), carto::Carto2AimsHeaderTranslator::translate(), and carto::Object::value().

Referenced by soma::VolumeRefFormatReader< T >::createAndRead().

◆ formatID()

template<typename T >
std::string soma::VolumeFormatReader< T >::formatID
virtual

Implements soma::FormatReader< carto::Volume< T > >.

Definition at line 552 of file volumeformatreader_d.h.

◆ read()

◆ setupAndRead()

Member Data Documentation

◆ _imr

template<typename T >
carto::rc_ptr<ImageReader<T> > soma::VolumeFormatReader< T >::_imr
protected

Definition at line 119 of file volumeformatreader.h.


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