34 #ifndef CARTODATA_VOLUME_VOLUMEREF_D_INLINE_H 35 #define CARTODATA_VOLUME_VOLUMEREF_D_INLINE_H 65 #ifdef CARTO_VOLUME_AUTO_DEREFERENCE 75 allocatorContext, allocated ) )
91 allocatorContext, allocated ) )
101 template <
typename T>
107 allocatorContext, allocated ) )
110 template <
typename T>
118 template <
typename T>
122 const AllocatorContext & allocContext ):
126 template <
typename T>
130 const AllocatorContext & allocContext ):
137 template <
typename T>
141 return (*this)->getSize();
144 template <
typename T>
148 return (*this)->getSizeX();
151 template <
typename T>
155 return (*this)->getSizeY();
158 template <
typename T>
162 return (*this)->getSizeZ();
165 template <
typename T>
169 return (*this)->getSizeT();
172 template <
typename T>
176 return (*this)->header();
179 template <
typename T>
183 return (*this)->header();
186 template <
typename T>
190 return (*this)->header();
193 template <
typename T>
197 return (*this)->header();
200 template <
typename T>
204 return (*this)->getVoxelSize();
210 template <
typename T>
214 return (*this)->begin();
217 template <
typename T>
221 return (*this)->end();
224 template <
typename T>
228 return (*this)->begin();
231 template <
typename T>
235 return (*this)->end();
241 template <
typename T>
245 return (**
this)( x, y, z, t );
248 template <
typename T>
252 return (**
this)( x, y, z, t );
255 template <
typename T>
259 return (*this)->at( x, y, z, t );
262 template <
typename T>
266 return (*this)->at( x, y, z, t );
269 template <
typename T>
273 return (**
this)(position);
276 template <
typename T>
280 return (**
this)(position);
283 template <
typename T>
287 return (*this)->at(position);
290 template <
typename T>
294 return (*this)->at(position);
297 template <
typename T>
301 return (**
this)(position);
304 template <
typename T>
308 return (**
this)(position);
311 template <
typename T>
315 return (*this)->at(position);
318 template <
typename T>
322 return (*this)->at(position);
328 template <
typename T>
332 (*this)->initialize();
335 template <
typename T>
339 return (*this)->allocatorContext();
342 template <
typename T>
349 template <
typename T>
356 (*this)->reallocate( sizeX, sizeY, sizeZ, sizeT,
357 keepcontents, allocatorContext, allocate );
361 template <
typename T>
367 (*this)->reallocate( size, keepcontents, allocatorContext, allocate );
376 template <
typename T>
380 return (*this)->refVolume();
383 template <
typename T>
387 return (*this)->setRefVolume( refvol );
390 template <
typename T>
394 return (*this)->posInRefVolume();
397 template <
typename T>
401 return (*this)->setPosInRefVolume( pos );
405 template <
typename T>
408 return (*this)->getLevelsCount();
411 template <
typename T>
414 return (*this)->refLevel(level);
417 template <
typename T>
420 return (*this)->refVolumeAtLevel(level);
423 template <
typename T>
426 const int level)
const {
427 return (*this)->posInRefVolumeAtLevel(level);
430 template <
typename T>
434 return (*this)->getBorders();
437 template <
typename T>
441 return (*this)->getStrides();
444 template <
typename T >
448 (*this)->copyHeaderFrom( other );
451 #endif // CARTO_VOLUME_AUTO_DEREFERENCE 457 template <
typename T>
464 template <
typename T>
471 template <
typename T>
481 template <
typename T>
485 out.
ostream() <<
"VolumeRef" << std::flush;
486 if( !volume.get() ) {
488 <<
": empty" << std::endl;
493 out.
ostream() <<
": " << std::flush;
494 return out << *(volume.get());
498 template <
typename T>
503 return volumeout << volume;
506 template <
typename T>
517 #endif // CARTODATA_VOLUME_VOLUMEREF_D_INLINE_H
rc_ptr< Volume< T > > refVolumeAtLevel(const int level) const
virtual void reallocate(int sizeX=1, int sizeY=1, int sizeZ=1, int sizeT=1, bool keepcontents=false, const AllocatorContext &allocatorContext=AllocatorContext(), bool allocate=true)
virtual void initialize()
void setRefVolume(const rc_ptr< Volume< T > > &refvol)
std::ostream & ostream() const
int refLevel(const int level) const
Convenient handle for a Volume - this is normally the entry point for all volumes handling...
static Object reference(T &value)
std::ostream & operator<<(std::ostream &out, const VoxelValue< T, C > &aa)
const T & operator()(long x, long y=0, long z=0, long t=0) const
int getLevelsCount() const
VolumeRef< T > view(const Position4Di &pos, const Position4Di &size)
const T & at(long x, long y=0, long z=0, long t=0) const
const PropertySet & header() const
Volume< T >::iterator iterator
std::vector< float > getVoxelSize() const
Volume< T >::const_iterator const_iterator
carto::Object getObjectHeader(Headered &h)
void setPosInRefVolume(const Position4Di &pos)
Volume< T >::Position Position
const Position4Di posInRefVolume() const
void displayRefVolumes(const Volume< T > &vol)
Display information about volumes hierarchy.
std::vector< int > getSize() const
rc_ptr< Volume< T > > refVolume() const
Volume< T >::Position posInRefVolumeAtLevel(const int level) const
std::vector< size_t > getStrides() const
Volume< T > * get() const
virtual void copyHeaderFrom(const PropertySet &other)
const PropertySet & getPropertySet() const __attribute__((__deprecated__("use header() instead")))
const AllocatorContext & allocatorContext() const
std::vector< int > getBorders() const
std::vector< int > Position