cartodata  4.5.0
volumeformatreader_d.h
Go to the documentation of this file.
1 /* This software and supporting documentation are distributed by
2  * Institut Federatif de Recherche 49
3  * CEA/NeuroSpin, Batiment 145,
4  * 91191 Gif-sur-Yvette cedex
5  * France
6  *
7  * This software is governed by the CeCILL-B license under
8  * French law and abiding by the rules of distribution of free software.
9  * You can use, modify and/or redistribute the software under the
10  * terms of the CeCILL-B license as circulated by CEA, CNRS
11  * and INRIA at the following URL "http://www.cecill.info".
12  *
13  * As a counterpart to the access to the source code and rights to copy,
14  * modify and redistribute granted by the license, users are provided only
15  * with a limited warranty and the software's author, the holder of the
16  * economic rights, and the successive licensors have only limited
17  * liability.
18  *
19  * In this respect, the user's attention is drawn to the risks associated
20  * with loading, using, modifying and/or developing or reproducing the
21  * software by the user in light of its specific status of free software,
22  * that may mean that it is complicated to manipulate, and that also
23  * therefore means that it is reserved for developers and experienced
24  * professionals having in-depth computer knowledge. Users are therefore
25  * encouraged to load and test the software's suitability as regards their
26  * requirements in conditions enabling the security of their systems and/or
27  * data to be ensured and, more generally, to use and operate it in the
28  * same conditions as regards security.
29  *
30  * The fact that you are presently reading this means that you have had
31  * knowledge of the CeCILL-B license and that you accept its terms.
32  */
33 
34 #ifndef CARTODATA_IO_VOLUMEFORMATREADER_D_H
35 #define CARTODATA_IO_VOLUMEFORMATREADER_D_H
36 //--- cartodata --------------------------------------------------------------
41 //--- soma io ----------------------------------------------------------------
49 //--- cartobase --------------------------------------------------------------
51 #include <cartobase/smart/rcptr.h>
54 //--- system -----------------------------------------------------------------
55 #include <vector>
56 #include <iostream>
57 #include <string>
58 //--- debug ------------------------------------------------------------------
61 #define localMsg( message ) cartoCondMsg( 4, message, "VOLUMEFORMATREADER" )
62 // localMsg must be undef at end of file
63 //----------------------------------------------------------------------------
64 
65 namespace soma
66 {
70 
71  //==========================================================================
72  // C O N S T R U C T O R S
73  //==========================================================================
74  template <typename T>
76  {
77  }
78 
79  //==========================================================================
80  // U R I O P T I O N S
81  //==========================================================================
82 
83  /**** setupAndRead *********************************************************
84  * Usually it is not necessary to redefine this method, but in the case of
85  * volumes the use of partial reading or borders triggers multiple volume
86  * allocations (see volume philosophy). These complex volumes are
87  * managed in VolumeUtilIO and setupAndRead/createAndRead must call them
88  * when needed.
89  **************************************************************************/
90  template <typename T> void
93  const AllocatorContext & context,
94  carto::Object options )
95  {
96  //=== Reading URI ========================================================
97  std::string uri = dsi->list().dataSource()->url();
98  std::string url = FileUtil::uriFilename( uri );
99  carto::Object urioptions = FileUtil::uriOptions( uri );
100  if( urioptions.get() ) {
101  if( !options.get() )
103  options->copyProperties( urioptions );
104  dsi->list().dataSource().reset( new FileDataSource( url ) );
105  }
106  //=== if no options -> classic reading ===================================
107  if( !options.get() )
108  return FormatReader<Volume<T> >::setupAndRead( obj, dsi, context,
109  options );
110  //=== else, look for known properties ====================================
111  std::set<std::string> prop = VolumeUtilIO<T>::listReadProperties();
112  typename std::set<std::string>::iterator p;
113  typename std::set<std::string>::iterator plast = prop.end();
114  for( p = prop.begin(); p != prop.end(); ++p )
115  {
116  if( options->hasProperty( *p ) ) {
117  VolumeUtilIO<T>::read( &obj, dsi, options );
118  bool convert = false;
119  options->getProperty( "convert_to_aims", convert );
120  if( convert )
121  {
123  translator.translate( carto::Object::reference( obj.header() ) );
124  }
125  return;
126  }
127  // for now it's juste unalloc/realloc.
128  // it must be possible to design a nice setup, but then changes are
129  // needed in VolumeUtilIO
130  }
131  //=== if no known property -> classic reading ============================
132  return FormatReader<Volume<T> >::setupAndRead( obj, dsi, context,
133  options );
134  }
135 
136  /**** createAndRead ********************************************************
137  * See setupAndRead
138  **************************************************************************/
139  template <typename T> Volume<T>*
141  const AllocatorContext & context,
142  carto::Object options )
143  {
144  localMsg( "Creating and reading object ( " + dsi->url() + " )" );
145 
146  //=== Reading URI ========================================================
147  std::string uri = dsi->list().dataSource()->url();
148  std::string url = FileUtil::uriFilename( uri );
149  carto::Object urioptions = FileUtil::uriOptions( uri );
150  if( !options.get() )
152  else
153  options = options->clone();
154  if( urioptions.get() ) {
155  options->copyProperties( urioptions );
156  dsi->list().dataSource().reset( new FileDataSource( url ) );
157  }
158  //=== if no options -> classic reading ===================================
159  if( !options.get() )
160  return FormatReader<Volume<T> >::createAndRead( dsi, context, options );
161  //=== else, look for known properties ====================================
162  std::set<std::string> prop = VolumeUtilIO<T>::listReadProperties();
163  typename std::set<std::string>::iterator p;
164  typename std::set<std::string>::iterator plast = prop.end();
165  Volume<T> *volume = 0;
166  for( p = prop.begin(); p != plast; ++p )
167  {
168  if( options->hasProperty( *p ) )
169  {
170  localMsg( "using VolumeUtilIO<T>::read ( " + dsi->url() + " )" );
171  volume = VolumeUtilIO<T>::read( 0, dsi, options );
172  break;
173  }
174  }
175  //=== if no known property -> classic reading ============================
176  if( !volume )
177  {
178  localMsg( "using classical Volume reading ( " + dsi->url() + " )" );
179  volume = FormatReader<Volume<T> >::createAndRead(
180  dsi, context, options );
181  }
182  if( volume )
183  {
184  bool convert = false;
185  options->getProperty( "convert_to_aims", convert );
186  if( convert )
187  {
189  translator.translate( carto::Object::reference( volume->header() ) );
190  }
191  }
192  return volume;
193  }
194 
195  //==========================================================================
196  // N E W M E T H O D S
197  //==========================================================================
198 
199  /**** Reading to a Volume<T> ***********************************************
200  * This method depends deeply on the data structure (Volume<T>). It is
201  * declared in FormatReader but only defined here.
202  **************************************************************************/
203  template <typename T>
206  const AllocatorContext & context,
207  carto::Object options )
208  {
209  localMsg( "Reading object ( " + dsi->url() + " )" );
210 
211  //=== Test data compability ==============================================
212  std::string otype = dsi->header()->getProperty( "object_type" )->getString();
213  std::string dtype = dsi->header()->getProperty( "data_type" )->getString();
214  std::string ttype = DataTypeCode<T>::dataType();
215  if( otype != "Volume" )
216  throw datatype_format_error( "unsupported data type - " + otype + " != Volume", dsi->url() );
217  if( dtype != ttype )
218  {
219  if( dsi->header()->hasProperty( "possible_data_types" ) )
220  {
221  size_t i;
222  for( i=0;
223  i<dsi->header()->getProperty( "possible_data_types" )->size();
224  ++i )
225  {
226  if( dsi->header()->getProperty( "possible_data_types" )
227  ->getArrayItem( i )->getString()
228  == ttype )
229  break;
230  }
231  if( i == dsi->header()->getProperty( "possible_data_types" )->size() )
232  throw datatype_format_error( dsi->url() );
233  } else
234  throw datatype_format_error( "unsupported data type - " + dtype + " != " + ttype, dsi->url() );
235  }
236 
237  //=== test for memory mapping ============================================
238  localMsg( "checking for memory mapping..." );
239  if( obj.allocatorContext().allocatorType()
241  {
242  localMsg( " -> Memory Mapping : nothing to read." );
243  return;
244  }
245 
246  //=== volume is a view ? =================================================
247  localMsg( "checking if object is a view..." );
248  carto::Volume<T>* parent1( 0 );
249  carto::Volume<T>* parent2( 0 );
250  parent1 = obj.refVolume().get();
251  if( parent1 )
252  parent2 = parent1->refVolume().get();
253  else if( !obj.allocatorContext().isAllocated() ) {
254  localMsg( " -> Unallocated Volume : nothing to read." );
255  return;
256  }
257  localMsg( std::string(" -> object ") + ( parent1 ? "is" : "isn't" )
258  + " a view and "
259  + ( obj.allocatorContext().isAllocated() ? "is" : "isn't" )
260  + " allocated." );
261  if( parent1 )
262  localMsg( std::string(" -> parent exists and ")
263  + ( parent1->allocatorContext().isAllocated() ? "is" : "isn't" )
264  + " allocated." );
265  if( parent2 )
266  localMsg( std::string(" -> grandparent exists and ")
267  + ( parent2->allocatorContext().isAllocated() ? "is" : "isn't" )
268  + " allocated." );
269 
270  //=== view size ==========================================================
271  localMsg( "reading view size..." );
272  std::vector<int> viewsize( 4, 0 );
273  viewsize[ 0 ] = obj.getSizeX();
274  viewsize[ 1 ] = obj.getSizeY();
275  viewsize[ 2 ] = obj.getSizeZ();
276  viewsize[ 3 ] = obj.getSizeT();
277  localMsg( " -> view size ( "
278  + carto::toString( viewsize[ 0 ] ) + ", "
279  + carto::toString( viewsize[ 1 ] ) + ", "
280  + carto::toString( viewsize[ 2 ] ) + ", "
281  + carto::toString( viewsize[ 3 ] ) + " )" );
282 
283  //=== multiresolution level ==============================================
284  localMsg( "reading multiresolution level..." );
285  int level = 0;
286  if( options->hasProperty( "resolution_level" ) ) {
287  options->getProperty( "resolution_level", level );
288  if (level < 0) {
289  try {
290  // Try to solve negative level values
291  level += dsi->header()->getProperty( "resolutions_dimension" )
292  ->size();
293  }
294  catch(...){}
295  }
296  }
297  localMsg( " -> level to read : " + carto::toString( level ) );
298 
299  //=== full volume size ===================================================
300  localMsg( "reading full volume size..." );
301  std::vector<int> imagesize( 4, 0 );
302  try {
303  // first we look for "resolutions_dimension" property
304  imagesize[ 0 ] = (int) rint(
305  dsi->header()->getProperty( "resolutions_dimension" )
306  ->getArrayItem( level )->getArrayItem( 0 )
307  ->getScalar() );
308  imagesize[ 1 ] = (int) rint(
309  dsi->header()->getProperty( "resolutions_dimension" )
310  ->getArrayItem( level )->getArrayItem( 1 )
311  ->getScalar() );
312  imagesize[ 2 ] = (int) rint(
313  dsi->header()->getProperty( "resolutions_dimension" )
314  ->getArrayItem( level )->getArrayItem( 2 )
315  ->getScalar() );
316  imagesize[ 3 ] = (int) rint(
317  dsi->header()->getProperty( "resolutions_dimension" )
318  ->getArrayItem( level )->getArrayItem( 3 )
319  ->getScalar() );
320  localMsg( " -> found \"resolutions_dimension\"." );
321  } catch( ... ) {
322  try {
323  // if it doesn't work, we look for "volume_dimension"
324  imagesize[ 0 ] = (int) rint(
325  dsi->header()->getProperty( "volume_dimension" )
326  ->getArrayItem( 0 )->getScalar() );
327  imagesize[ 1 ] = (int) rint(
328  dsi->header()->getProperty( "volume_dimension" )
329  ->getArrayItem( 1 )->getScalar() );
330  imagesize[ 2 ] = (int) rint(
331  dsi->header()->getProperty( "volume_dimension" )
332  ->getArrayItem( 2 )->getScalar() );
333  imagesize[ 3 ] = (int) rint(
334  dsi->header()->getProperty( "volume_dimension" )
335  ->getArrayItem( 3 )->getScalar() );
336  localMsg( " -> found \"volume_dimension\"." );
337  } catch( ... ) {
338  // if still nothing, we look for parent volumes
339  if( parent1 && !parent1->allocatorContext().isAllocated() ) {
340  imagesize[ 0 ] = parent1->getSizeX();
341  imagesize[ 1 ] = parent1->getSizeY();
342  imagesize[ 2 ] = parent1->getSizeZ();
343  imagesize[ 3 ] = parent1->getSizeT();
344  localMsg( " -> found unallocated parent." );
345  } else if( parent2 ) {
346  imagesize[ 0 ] = parent2->getSizeX();
347  imagesize[ 1 ] = parent2->getSizeY();
348  imagesize[ 2 ] = parent2->getSizeZ();
349  imagesize[ 3 ] = parent2->getSizeT();
350  localMsg( " -> found grandparent." );
351  } else {
352  imagesize = viewsize;
353  localMsg( " -> full volume is self." );
354  }
355  }
356  }
357  localMsg( " -> full volume size ( "
358  + carto::toString( imagesize[ 0 ] ) + ", "
359  + carto::toString( imagesize[ 1 ] ) + ", "
360  + carto::toString( imagesize[ 2 ] ) + ", "
361  + carto::toString( imagesize[ 3 ] ) + " )" );
362 
363  //=== allocated volume size ==============================================
364  localMsg( "reading allocated size..." );
365  std::vector<int> allocsize( 4, 0 );
366  if( !parent1 ) {
367  allocsize = viewsize;
368  localMsg( " -> allocated volume is self (full volume)." );
369  } else if( !parent1->allocatorContext().isAllocated() ) {
370  allocsize = viewsize;
371  localMsg( " -> allocated volume is self (partial volume)." );
372  } else {
373  allocsize[0] = parent1->getSizeX();
374  allocsize[1] = parent1->getSizeY();
375  allocsize[2] = parent1->getSizeZ();
376  allocsize[3] = parent1->getSizeT();
377  localMsg( " -> allocated volume is parent "
378  "(borders or partially loading in full volume)." );
379  }
380  localMsg( " -> allocated volume size ( "
381  + carto::toString( allocsize[ 0 ] ) + ", "
382  + carto::toString( allocsize[ 1 ] ) + ", "
383  + carto::toString( allocsize[ 2 ] ) + ", "
384  + carto::toString( allocsize[ 3 ] ) + " )" );
385 
386  //=== strides ============================================================
387  std::vector<long> strides(4);
388  strides[0] = &obj(1,0,0,0) - &obj(0,0,0,0);
389  strides[1] = &obj(0,1,0,0) - &obj(0,0,0,0);
390  strides[2] = &obj(0,0,1,0) - &obj(0,0,0,0);
391  strides[3] = &obj(0,0,0,1) - &obj(0,0,0,0);
392 
393  //=== region's origine ===================================================
394  localMsg( "reading view position in reference to full volume..." );
395  std::vector<int> pos ( 4 , 0 );
396  if( parent1 && !parent1->allocatorContext().isAllocated() ) {
397  pos[ 0 ] = obj.posInRefVolume()[ 0 ];
398  pos[ 1 ] = obj.posInRefVolume()[ 1 ];
399  pos[ 2 ] = obj.posInRefVolume()[ 2 ];
400  pos[ 3 ] = obj.posInRefVolume()[ 3 ];
401  } else if( parent2 ) {
402  pos[ 0 ] = obj.posInRefVolume()[ 0 ] + parent1->posInRefVolume()[ 0 ];
403  pos[ 1 ] = obj.posInRefVolume()[ 1 ] + parent1->posInRefVolume()[ 1 ];
404  pos[ 2 ] = obj.posInRefVolume()[ 2 ] + parent1->posInRefVolume()[ 2 ];
405  pos[ 3 ] = obj.posInRefVolume()[ 3 ] + parent1->posInRefVolume()[ 3 ];
406  }
407  localMsg( " -> view position ( "
408  + carto::toString( pos[ 0 ] ) + ", "
409  + carto::toString( pos[ 1 ] ) + ", "
410  + carto::toString( pos[ 2 ] ) + ", "
411  + carto::toString( pos[ 3 ] ) + " )" );
412 
413  //=== possibilities : with borders, partial reading ======================
414  bool withborders = allocsize[0] > viewsize[0] ||
415  allocsize[1] > viewsize[1] ||
416  allocsize[2] > viewsize[2] ||
417  allocsize[3] > viewsize[3];
418  bool partialreading = imagesize[0] > viewsize[0] ||
419  imagesize[1] > viewsize[1] ||
420  imagesize[2] > viewsize[2] ||
421  imagesize[3] > viewsize[3];
422  localMsg( "With Borders : "
423  + std::string( ( withborders ? "yes" : "no" ) ) );
424  localMsg( "Partial Reading : "
425  + std::string( ( partialreading ? "yes" : "no" ) ) );
426 
427  //=== reading volume =====================================================
428  localMsg( "reading volume..." );
429  int y, z, t;
430  if( !withborders || dsi->capabilities().canHandleStrides() )
431  {
432  // we can read the volume/region into a contiguous buffer
433  _imr->read( ( T * ) &obj(0,0,0,0), *dsi, pos,
434  viewsize, strides, options );
435  }
436  else
437  {
438  // we are in a "border" context. The volume/region must be read
439  // line by line
440  std::vector<int> posline ( pos );
441  std::vector<int> sizeline ( 4, 1 );
442  sizeline[ 0 ] = viewsize[ 0 ];
443  for ( t=0; t<viewsize[ 3 ]; ++t )
444  for ( z=0; z<viewsize[ 2 ]; ++z )
445  for ( y=0; y<viewsize[ 1 ]; ++y ) {
446  posline[ 1 ] = pos[ 1 ] + y;
447  posline[ 2 ] = pos[ 2 ] + z;
448  posline[ 3 ] = pos[ 3 ] + t;
449  _imr->read( ( T * ) &obj(0,y,z,t), *dsi, posline,
450  sizeline, strides, options );
451  }
452  }
453 
454  // we reset at 0 the ImageReader's members (sizes, binary, ...) so that
455  // they are recomputed at the next reading.
456  _imr->resetParams();
457  }
458 
459 
460  template <typename T>
462  {
464  reader->attach( carto::rc_ptr<ImageReader<T> >( _imr->cloneReader() ) );
465  return reader;
466  }
467 
468  /***************************************************************************
469  * Attaching a specific ImageReader to the FormatReader
470  **************************************************************************/
471  template <typename T>
473  {
474  _imr = imr;
475  }
476 
477 
478  template <typename T>
480  {
481  // delegate to ImageReader
482  if( !_imr )
483  return "";
484  return _imr->formatID();
485  }
486 
490 
491  //==========================================================================
492  // C O N S T R U C T O R S
493  //==========================================================================
494  template <typename T>
496  {
497  }
498 
499  //==========================================================================
500  // U R I O P T I O N S
501  //==========================================================================
502  /*** setupAndRead **********************************************************
503  * see VolumeFormatReader
504  **************************************************************************/
505  template <typename T> void
508  const AllocatorContext & context,
509  carto::Object options )
510  {
511  //=== Reading URI ========================================================
512  std::string uri = dsi->list().dataSource()->url();
513  std::string url = FileUtil::uriFilename( uri );
514  carto::Object urioptions = FileUtil::uriOptions( uri );
515  if( urioptions.get() ) {
516  if( !options.get() )
518  options->copyProperties( urioptions );
519  dsi->list().dataSource().reset( new FileDataSource( url ) );
520  }
521  //=== if no options -> classic reading ===================================
522  if( !options.get() )
523  return FormatReader<VolumeRef<T> >::setupAndRead( obj, dsi, context,
524  options );
525  //=== else, look for known properties ====================================
526  std::set<std::string> prop = VolumeUtilIO<T>::listReadProperties();
527  typename std::set<std::string>::iterator p;
528  typename std::set<std::string>::iterator plast = prop.end();
529  for( p = prop.begin(); p != plast; ++p )
530  {
531  if( options->hasProperty( *p ) )
532  {
534  vrf.attach( _imr );
535  vrf.setupAndRead( *obj, dsi, context, options );
536  bool convert = false;
537  options->getProperty( "convert_to_aims", convert );
538  if( convert )
539  {
541  translator.translate( carto::Object::reference( obj->header() ) );
542  }
543  return; // return as soon as one read prop has been found.
544  }
545  }
546  //=== if no known property -> classic reading ============================
547  return FormatReader<VolumeRef<T> >::setupAndRead( obj, dsi, context,
548  options );
549  }
550 
551  /*** createAndRead *********************************************************
552  * see VolumeFormatReader
553  **************************************************************************/
554  template <typename T> VolumeRef<T>*
556  const AllocatorContext & context,
557  carto::Object options )
558  {
560  vrf.attach( _imr );
561  return new VolumeRef<T>( vrf.createAndRead( dsi, context, options ) );
562  }
563 
564  //==========================================================================
565  // N E W M E T H O D S
566  //==========================================================================
567 
568  /*** Reading to a Volume<T> ************************************************
569  * This method depends deeply on the data structure (Volume<T>). It is
570  * declared in FormatReader but only defined here.
571  **************************************************************************/
572  template <typename T>
575  const AllocatorContext & context,
576  carto::Object options )
577  {
579  vrf.attach( _imr );
580  vrf.read( *obj, dsi, context, options );
581  }
582 
583  /***************************************************************************
584  * Attaching a specific ImageReader to the FormatReader
585  **************************************************************************/
586  template <typename T>
588  {
589  _imr = imr;
590  }
591 
592 
593  template <typename T>
596  {
598  reader->attach( carto::rc_ptr<ImageReader<T> >( _imr->cloneReader() ) );
599  return reader;
600  }
601 
602 
603  template <typename T>
605  {
606  // delegate to ImageReader
607  if( !_imr )
608  return "";
609  return _imr->formatID();
610  }
611 
612 }
613 
614 #undef localMsg
615 #endif
const DataSourceCapabilities & capabilities() const
4D Volume main class
const Position4Di posInRefVolume() const
Get position in parent volume.
Definition: volumebase_d.h:451
std::string url() const
virtual bool getProperty(const std::string &key, Object &value) const =0
#define localMsg(message)
FormatReader specialized for reference to 4D Volume.
virtual void setupAndRead(VolumeRef< T > &obj, carto::rc_ptr< DataSourceInfo > dsi, const AllocatorContext &context, carto::Object options)
Full reading procedure, for an already existing object.
const AllocatorContext & allocatorContext() const
returns volume's AllocatorContext
Definition: volumebase_d.h:439
const carto::rc_ptr< DataSource > & dataSource(const std::string &s="default", int i=0) const
int getSizeT() const
Definition: volumeproxy.h:118
void attach(carto::rc_ptr< ImageReader< T > > imr)
Linking to a ImageReader Allows us to declare only once the ImageReader.
virtual bool hasProperty(const std::string &key) const =0
Convenient handle for a Volume - this is normally the entry point for all volumes handling...
virtual void translate(Object srcheader, Object dstheader=none()) const
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.
static Object reference(T &value)
MappingMode allocatorType() const
virtual std::string formatID() const
const DataSourceList & list() const
FormatReader specialized for 4D Volume.
virtual FormatReader< carto::Volume< T > > * clone() const
const carto::Object & header() const
GenericObject * get() const
static carto::Volume< T > * read(carto::Volume< T > *obj, carto::rc_ptr< DataSourceInfo > dsi, carto::Object options)
Manages all the volumes necessary and returns the final Volume.
int getSizeZ() const
Definition: volumeproxy.h:108
virtual Volume< T > * createAndRead(carto::rc_ptr< DataSourceInfo > dsi, const AllocatorContext &context, carto::Object options)
Factory mode: creates an object and reads it.
rc_ptr< Volume< T > > refVolume() const
Get parent volume.
Definition: volumebase_d.h:445
int getSizeX() const
Definition: volumeproxy.h:88
#define soma
virtual VolumeRef< T > * createAndRead(carto::rc_ptr< DataSourceInfo > dsi, const AllocatorContext &context, carto::Object options)
Factory mode: creates an object and reads it.
static Object value()
virtual void read(carto::VolumeRef< 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 appropri...
virtual std::string formatID() const
void attach(carto::rc_ptr< ImageReader< T > > imr)
Linking to a ImageReader Allows us to declare only once the ImageReader.
virtual FormatReader< carto::VolumeRef< T > > * clone() const
static std::set< std::string > listReadProperties()
list of properties triggering partial reading and/or borders
bool isAllocated() const
std::string toString(const T &object)
virtual Object clone() const =0
virtual void copyProperties(Object source)
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 appropri...
int getSizeY() const
Definition: volumeproxy.h:98