34#ifndef CARTODATA_VOLUME_VOLUMEREF_D_INLINE_H
35#define CARTODATA_VOLUME_VOLUMEREF_D_INLINE_H
65#ifdef CARTO_VOLUME_AUTO_DEREFERENCE
101 template <
typename T>
110 template <
typename T>
118 template <
typename T>
122 const AllocatorContext & allocContext,
123 bool transToParent ):
128 template <
typename T>
132 const AllocatorContext & allocContext,
133 bool transToParent ):
141 template <
typename T>
145 return (*this)->getSize();
148 template <
typename T>
152 return (*this)->getSizeX();
155 template <
typename T>
159 return (*this)->getSizeY();
162 template <
typename T>
166 return (*this)->getSizeZ();
169 template <
typename T>
173 return (*this)->getSizeT();
176 template <
typename T>
180 return (*this)->header();
183 template <
typename T>
187 return (*this)->header();
190 template <
typename T>
194 return (*this)->header();
197 template <
typename T>
201 return (*this)->header();
204 template <
typename T>
208 return (*this)->getVoxelSize();
211 template <
typename T>
215 (*this)->setVoxelSize( vs );
218 template <
typename T>
222 (*this)->setVoxelSize( vx, vy, vz, vt );
228 template <
typename T>
232 return (*this)->
begin();
235 template <
typename T>
239 return (*this)->
end();
242 template <
typename T>
246 return (*this)->
begin();
249 template <
typename T>
253 return (*this)->
end();
259 template <
typename T>
263 return (**
this)( x, y, z, t );
266 template <
typename T>
270 return (**
this)( x, y, z, t );
273 template <
typename T>
277 return (*this)->
at( x, y, z, t );
280 template <
typename T>
284 return (*this)->at( x, y, z, t );
287 template <
typename T>
291 return (**
this)(position);
294 template <
typename T>
298 return (**
this)(position);
301 template <
typename T>
305 return (*this)->at(position);
308 template <
typename T>
312 return (*this)->at(position);
315 template <
typename T>
319 return (**
this)(position);
322 template <
typename T>
326 return (**
this)(position);
329 template <
typename T>
333 return (*this)->at(position);
336 template <
typename T>
340 return (*this)->at(position);
346 template <
typename T>
350 (*this)->initialize();
353 template <
typename T>
357 return (*this)->allocatorContext();
360 template <
typename T>
367 template <
typename T>
374 (*this)->reallocate( sizeX, sizeY, sizeZ, sizeT,
379 template <
typename T>
382 const AllocatorContext& allocatorContext,
385 (*this)->reallocate( size, keepcontents, allocatorContext, allocate );
394 template <
typename T>
398 return (*this)->refVolume();
401 template <
typename T>
405 return (*this)->setRefVolume( refvol );
408 template <
typename T>
415 template <
typename T>
423 template <
typename T>
426 return (*this)->getLevelsCount();
429 template <
typename T>
432 return (*this)->refLevel(level);
435 template <
typename T>
438 return (*this)->refVolumeAtLevel(level);
441 template <
typename T>
444 const int level)
const {
448 template <
typename T>
452 return (*this)->getBorders();
455 template <
typename T>
459 return (*this)->getStrides();
462 template <
typename T >
466 (*this)->copyHeaderFrom( other );
475 template <
typename T>
482 template <
typename T>
489 template <
typename T>
499 template <
typename T>
503 out.
ostream() <<
"VolumeRef" << std::flush;
504 if( !volume.get() ) {
506 <<
": empty" << std::endl;
511 out.
ostream() <<
": " << std::flush;
512 return out << *(volume.get());
516 template <
typename T>
521 return volumeout << volume;
524 template <
typename T>
Object reference(Object &value)
std::ostream & ostream() const
Convenient handle for a Volume - this is normally the entry point for all volumes handling.
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)
const PropertySet & getPropertySet() const __attribute__((__deprecated__("use header() instead")))
int refLevel(const int level) const
std::vector< int > getBorders() const
Volume< T >::Position Position
void setVoxelSize(float vx, float vy=1., float vz=1., float vt=1.)
std::vector< float > getVoxelSize() const
void setRefVolume(const rc_ptr< Volume< T > > &refvol)
virtual void copyHeaderFrom(const PropertySet &other)
Volume< T >::Position posInRefVolumeAtLevel(const int level) const
int getLevelsCount() const
rc_ptr< Volume< T > > refVolume() const
rc_ptr< Volume< T > > refVolumeAtLevel(const int level) const
std::vector< int > getSize() const
const T & at(long x, long y=0, long z=0, long t=0) const
Volume< T >::iterator iterator
std::vector< long > getStrides() const
const PropertySet & header() const
const T & operator()(long x, long y=0, long z=0, long t=0) const
const AllocatorContext & allocatorContext() const
Volume< T >::const_iterator const_iterator
virtual void initialize()
Volume< T >::Position4Di Position4Di
void setPosInRefVolume(const Position4Di &pos)
const Position4Di posInRefVolume() const
VolumeRef< T > view(const Position4Di &pos, const Position4Di &size)
iterator begin()
Iterators returned here are the most "basic" (and fastest) iterators: they go from the first voxel li...
std::vector< int > Position
void setPosInRefVolume(const Position4Di &pos)
Set position in parent volume.
const Position & posInRefVolume() const
Get position in parent volume.
Position posInRefVolumeAtLevel(const int level) const
Get position relatively to parent volume at specified level.
const T & at(long x, long y=0, long z=0, long t=0) const
void displayRefVolumes(const Volume< T > &vol)
Display information about volumes hierarchy.
carto::Object getObjectHeader(Headered &h)
std::ostream & operator<<(std::ostream &out, const VoxelValue< T, C > &aa)