cartodata  5.0.5
carto::VolumeRef< T > Class Template Reference

Convenient handle for a Volume - this is normally the entry point for all volumes handling. More...

#include <cartodata/io/volumeformatreader.h>

Inheritance diagram for carto::VolumeRef< T >:
Collaboration diagram for carto::VolumeRef< T >:

Public Types

typedef T datatype
 
typedef Volume< T >::Position4Di Position4Di
 
typedef Volume< T >::Position Position
 
typedef Volume< T >::iterator iterator
 
typedef Volume< T >::const_iterator const_iterator
 
- Public Types inherited from carto::ref< T >
typedef T referenced_type
 
- Public Types inherited from carto::const_ref< T >
typedef T referenced_type
 

Public Member Functions

 VolumeRef ()
 
 VolumeRef (Volume< T > *x)
 
 VolumeRef (const rc_ptr< Volume< T > > &x)
 
virtual ~VolumeRef ()
 
Volume< T > & operator* ()
 
const Volume< T > & operator* () const
 
 VolumeRef (int sizeX, int sizeY=1, int sizeZ=1, int sizeT=1, const AllocatorContext &allocatorContext=AllocatorContext(), bool allocated=true)
 
 VolumeRef (const Position4Di &size, const AllocatorContext &allocatorContext=AllocatorContext(), bool allocated=true)
 
 VolumeRef (int sizeX, int sizeY, int sizeZ, int sizeT, int bordersize, const AllocatorContext &allocatorContext=AllocatorContext(), bool allocated=true)
 
 VolumeRef (const Position4Di &size, int bordersize, const AllocatorContext &allocatorContext=AllocatorContext(), bool allocated=true)
 
 VolumeRef (int sizeX, int sizeY, int sizeZ, int sizeT, const Position4Di &border, const AllocatorContext &allocatorContext=AllocatorContext(), bool allocated=true)
 
 VolumeRef (const Position4Di &size, const Position4Di &border, const AllocatorContext &allocatorContext=AllocatorContext(), bool allocated=true)
 
 VolumeRef (rc_ptr< Volume< T > > other, const Position4Di &pos, const Position4Di &size=Position4Di(-1, -1, -1, -1), const AllocatorContext &allocContext=AllocatorContext())
 
 VolumeRef (rc_ptr< Volume< T > > other, const Position &pos, const Position &size=Position(), const AllocatorContext &allocContext=AllocatorContext())
 
std::vector< int > getSize () const
 
int getSizeX () const
 
int getSizeY () const
 
int getSizeZ () const
 
int getSizeT () const
 
const PropertySetheader () const
 
PropertySetheader ()
 
const PropertySetgetPropertySet () const __attribute__((__deprecated__("use header() instead")))
 
PropertySetgetPropertySet () __attribute__((__deprecated__("use header() instead")))
 
std::vector< float > getVoxelSize () const
 
virtual void copyHeaderFrom (const PropertySet &other)
 
virtual void copyHeaderFrom (const Object &other)
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
const T & operator() (long x, long y=0, long z=0, long t=0) const
 
T & operator() (long x, long y=0, long z=0, long t=0)
 
const T & at (long x, long y=0, long z=0, long t=0) const
 
T & at (long x, long y=0, long z=0, long t=0)
 
const T & operator() (const Position4Di &position) const
 
T & operator() (const Position4Di &position)
 
const T & at (const Position4Di &position) const
 
T & at (const Position4Di &position)
 
const T & operator() (const Position &position) const
 
T & operator() (const Position &position)
 
const T & at (const Position &position) const
 
T & at (const Position &position)
 
virtual void initialize ()
 
const AllocatorContext & allocatorContext () const
 
void allocate ()
 
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)
 
VolumeRef< T > copy () const
 
template<typename OUTP >
VolumeRef< OUTP > copy () const
 
VolumeRef< T > deepcopy () const
 
template<typename OUTP >
VolumeRef< OUTP > deepcopy () const
 
VolumeRef< T > copyStructure () const
 
template<typename OUTP >
VolumeRef< OUTP > copyStructure () const
 
template<typename OUTP >
 operator VolumeRef< OUTP > () const
 
int getLevelsCount () const
 
int refLevel (const int level) const
 
rc_ptr< Volume< T > > refVolume () const
 
rc_ptr< Volume< T > > refVolumeAtLevel (const int level) const
 
void setRefVolume (const rc_ptr< Volume< T > > &refvol)
 
const Position4Di posInRefVolume () const
 
Volume< T >::Position posInRefVolumeAtLevel (const int level) const
 
void setPosInRefVolume (const Position4Di &pos)
 
void setPosInRefVolume (const typename Volume< T >::Position &pos)
 
std::vector< int > getBorders () const
 
std::vector< size_t > getStrides () const
 
bool all () const
 True if all values compare to true. More...
 
bool any () const
 True if at least one value compares to true. More...
 
min () const
 
max () const
 
DataTypeTraits< T >::LongType sum () const
 To avoid overflow, the biggest possible type (intmax_t, uintmax_t, double...) is used for computation and returned. More...
 
void fill (const T &value)
 Fills the volume with a given value. More...
 
VolumeRef< T > & operator= (const T &value)
 
VolumeRef< T > view (const Position4Di &pos, const Position4Di &size)
 
const VolumeRef< T > view (const Position4Di &pos, const Position4Di &size) const
 
- Public Member Functions inherited from carto::rc_ptr< Volume< T > >
 rc_ptr ()
 
 rc_ptr (Volume< T > *p)
 
 rc_ptr (Volume< T > *p, bool externalowner)
 
 rc_ptr (std::auto_ptr< U > r)
 
void reset (Volume< T > *p=NULL)
 
Volume< T > * get () const
 
bool operator< (const rc_ptr< Volume< T > > &other) const
 
 operator insipid * () const
 
- Public Member Functions inherited from carto::ref< T >
 ref ()
 
 ref (T *pObject)
 
 ref (T *pObject, bool externalowner)
 
 ref (std::auto_ptr< U > r)
 
 ref (const ref< T > &other)
 
 ref (const ref< R > &other)
 
 ~ref ()
 
T * release ()
 
ref< T > & operator= (const ref< T > &other)
 
T * operator-> () const
 
T & operator* () const
 
T * pointer () const
 
- Public Member Functions inherited from carto::const_ref< T >
 const_ref ()
 
 const_ref (const T *pObject)
 
 const_ref (const T *pObject, bool externalowner)
 
 const_ref (std::auto_ptr< U > r)
 
 const_ref (const ref< T > &other)
 
 const_ref (const const_ref< T > &other)
 
 const_ref (const ref< R > &o)
 
 const_ref (const const_ref< R > &other)
 
 ~const_ref ()
 
const_ref< T > & operator= (const ref< T > &other)
 
const_ref< T > & operator= (const const_ref< T > &other)
 
bool isNull () const
 
bool operator== (const ref< T > &other) const
 
bool operator== (const T *pointer) const
 
bool operator== (const const_ref< T > &other) const
 
bool operator!= (const ref< T > &other) const
 
bool operator!= (const const_ref< T > &other) const
 
bool operator!= (const T *pointer) const
 
const T * operator-> () const
 
const T & operator* () const
 
const T * pointer () const
 
int refCount () const
 
- Public Member Functions inherited from carto::RefData< T >
int count () const
 

Detailed Description

template<typename T>
class carto::VolumeRef< T >

Convenient handle for a Volume - this is normally the entry point for all volumes handling.

See Volume for more documentation

Definition at line 51 of file volumeformatreader.h.

Member Typedef Documentation

◆ const_iterator

template<typename T>
typedef Volume<T>::const_iterator carto::VolumeRef< T >::const_iterator

Definition at line 97 of file volumeref.h.

◆ datatype

template<typename T>
typedef T carto::VolumeRef< T >::datatype

Definition at line 86 of file volumeref.h.

◆ iterator

template<typename T>
typedef Volume<T>::iterator carto::VolumeRef< T >::iterator

Definition at line 96 of file volumeref.h.

◆ Position

template<typename T>
typedef Volume<T>::Position carto::VolumeRef< T >::Position

Definition at line 95 of file volumeref.h.

◆ Position4Di

template<typename T>
typedef Volume<T>::Position4Di carto::VolumeRef< T >::Position4Di

Definition at line 94 of file volumeref.h.

Constructor & Destructor Documentation

◆ VolumeRef() [1/11]

template<typename T >
carto::VolumeRef< T >::VolumeRef ( )

Definition at line 47 of file volumeref_d_inline.h.

◆ VolumeRef() [2/11]

template<typename T >
carto::VolumeRef< T >::VolumeRef ( Volume< T > *  x)

Definition at line 52 of file volumeref_d_inline.h.

◆ VolumeRef() [3/11]

template<typename T >
carto::VolumeRef< T >::VolumeRef ( const rc_ptr< Volume< T > > &  x)

Definition at line 57 of file volumeref_d_inline.h.

◆ ~VolumeRef()

template<typename T >
carto::VolumeRef< T >::~VolumeRef ( )
virtual

Definition at line 62 of file volumeref_d_inline.h.

◆ VolumeRef() [4/11]

template<typename T >
carto::VolumeRef< T >::VolumeRef ( int  sizeX,
int  sizeY = 1,
int  sizeZ = 1,
int  sizeT = 1,
const AllocatorContext &  allocatorContext = AllocatorContext(),
bool  allocated = true 
)
explicit

Definition at line 71 of file volumeref_d_inline.h.

◆ VolumeRef() [5/11]

template<typename T >
carto::VolumeRef< T >::VolumeRef ( const Position4Di size,
const AllocatorContext &  allocatorContext = AllocatorContext(),
bool  allocated = true 
)
explicit

Definition at line 79 of file volumeref_d_inline.h.

◆ VolumeRef() [6/11]

template<typename T >
carto::VolumeRef< T >::VolumeRef ( int  sizeX,
int  sizeY,
int  sizeZ,
int  sizeT,
int  bordersize,
const AllocatorContext &  allocatorContext = AllocatorContext(),
bool  allocated = true 
)
explicit

Definition at line 86 of file volumeref_d_inline.h.

◆ VolumeRef() [7/11]

template<typename T >
carto::VolumeRef< T >::VolumeRef ( const Position4Di size,
int  bordersize,
const AllocatorContext &  allocatorContext = AllocatorContext(),
bool  allocated = true 
)
explicit

Definition at line 95 of file volumeref_d_inline.h.

◆ VolumeRef() [8/11]

template<typename T >
carto::VolumeRef< T >::VolumeRef ( int  sizeX,
int  sizeY,
int  sizeZ,
int  sizeT,
const Position4Di border,
const AllocatorContext &  allocatorContext = AllocatorContext(),
bool  allocated = true 
)
explicit

Definition at line 102 of file volumeref_d_inline.h.

◆ VolumeRef() [9/11]

template<typename T >
carto::VolumeRef< T >::VolumeRef ( const Position4Di size,
const Position4Di border,
const AllocatorContext &  allocatorContext = AllocatorContext(),
bool  allocated = true 
)
explicit

Definition at line 111 of file volumeref_d_inline.h.

◆ VolumeRef() [10/11]

template<typename T >
carto::VolumeRef< T >::VolumeRef ( rc_ptr< Volume< T > >  other,
const Position4Di pos,
const Position4Di size = Position4Di( -1, -1, -1, -1 ),
const AllocatorContext &  allocContext = AllocatorContext() 
)
explicit

Definition at line 119 of file volumeref_d_inline.h.

◆ VolumeRef() [11/11]

template<typename T >
carto::VolumeRef< T >::VolumeRef ( rc_ptr< Volume< T > >  other,
const Position pos,
const Position size = Position(),
const AllocatorContext &  allocContext = AllocatorContext() 
)
explicit

Definition at line 127 of file volumeref_d_inline.h.

Member Function Documentation

◆ all()

template<typename T >
bool carto::VolumeRef< T >::all ( ) const
inline

True if all values compare to true.

Definition at line 57 of file volumeref_d_operators.h.

◆ allocate()

template<typename T >
void carto::VolumeRef< T >::allocate ( )
inline

Definition at line 344 of file volumeref_d_inline.h.

Referenced by carto::VolumeRef< T >::reallocate().

◆ allocatorContext()

template<typename T >
const AllocatorContext & carto::VolumeRef< T >::allocatorContext ( ) const
inline

Definition at line 337 of file volumeref_d_inline.h.

Referenced by carto::VolumeRef< T >::reallocate().

◆ any()

template<typename T >
bool carto::VolumeRef< T >::any ( ) const
inline

True if at least one value compares to true.

Definition at line 64 of file volumeref_d_operators.h.

◆ at() [1/6]

template<typename T >
const T & carto::VolumeRef< T >::at ( long  x,
long  y = 0,
long  z = 0,
long  t = 0 
) const
inline

◆ at() [2/6]

template<typename T >
T & carto::VolumeRef< T >::at ( long  x,
long  y = 0,
long  z = 0,
long  t = 0 
)
inline

Definition at line 264 of file volumeref_d_inline.h.

◆ at() [3/6]

template<typename T >
const T & carto::VolumeRef< T >::at ( const Position4Di position) const
inline

Definition at line 285 of file volumeref_d_inline.h.

◆ at() [4/6]

template<typename T >
T & carto::VolumeRef< T >::at ( const Position4Di position)
inline

Definition at line 292 of file volumeref_d_inline.h.

◆ at() [5/6]

template<typename T >
const T & carto::VolumeRef< T >::at ( const Position position) const
inline

Definition at line 313 of file volumeref_d_inline.h.

◆ at() [6/6]

template<typename T >
T & carto::VolumeRef< T >::at ( const Position position)
inline

Definition at line 320 of file volumeref_d_inline.h.

◆ begin() [1/2]

template<typename T >
VolumeRef< T >::iterator carto::VolumeRef< T >::begin ( )
inline

Definition at line 212 of file volumeref_d_inline.h.

◆ begin() [2/2]

template<typename T >
VolumeRef< T >::const_iterator carto::VolumeRef< T >::begin ( ) const
inline

Definition at line 226 of file volumeref_d_inline.h.

◆ copy() [1/2]

template<typename T >
VolumeRef< OUTP > carto::VolumeRef< T >::copy ( ) const
inline

Definition at line 126 of file volumeref_d_operators.h.

◆ copy() [2/2]

template<typename T>
template<typename OUTP >
VolumeRef<OUTP> carto::VolumeRef< T >::copy ( ) const

◆ copyHeaderFrom() [1/2]

template<typename T >
void carto::VolumeRef< T >::copyHeaderFrom ( const PropertySet other)
inlinevirtual

Definition at line 446 of file volumeref_d_inline.h.

◆ copyHeaderFrom() [2/2]

template<typename T >
void carto::VolumeRef< T >::copyHeaderFrom ( const Object other)
virtual

Definition at line 65 of file volumeref_d.h.

◆ copyStructure() [1/2]

template<typename T >
VolumeRef< OUTP > carto::VolumeRef< T >::copyStructure ( ) const
inline

Definition at line 156 of file volumeref_d_operators.h.

◆ copyStructure() [2/2]

template<typename T>
template<typename OUTP >
VolumeRef<OUTP> carto::VolumeRef< T >::copyStructure ( ) const

◆ deepcopy() [1/2]

template<typename T >
VolumeRef< OUTP > carto::VolumeRef< T >::deepcopy ( ) const
inline

Definition at line 141 of file volumeref_d_operators.h.

◆ deepcopy() [2/2]

template<typename T>
template<typename OUTP >
VolumeRef<OUTP> carto::VolumeRef< T >::deepcopy ( ) const

◆ end() [1/2]

template<typename T >
VolumeRef< T >::iterator carto::VolumeRef< T >::end ( )
inline

Definition at line 219 of file volumeref_d_inline.h.

◆ end() [2/2]

template<typename T >
VolumeRef< T >::const_iterator carto::VolumeRef< T >::end ( ) const
inline

Definition at line 233 of file volumeref_d_inline.h.

◆ fill()

template<typename T >
void carto::VolumeRef< T >::fill ( const T &  value)
inline

Fills the volume with a given value.

Definition at line 106 of file volumeref_d_operators.h.

◆ getBorders()

template<typename T >
std::vector< int > carto::VolumeRef< T >::getBorders ( ) const
inline

Definition at line 432 of file volumeref_d_inline.h.

◆ getLevelsCount()

template<typename T >
int carto::VolumeRef< T >::getLevelsCount ( ) const
inline

Definition at line 407 of file volumeref_d_inline.h.

◆ getPropertySet() [1/2]

template<typename T >
const PropertySet & carto::VolumeRef< T >::getPropertySet ( ) const
inline

Definition at line 188 of file volumeref_d_inline.h.

◆ getPropertySet() [2/2]

template<typename T >
PropertySet & carto::VolumeRef< T >::getPropertySet ( )
inline

Definition at line 195 of file volumeref_d_inline.h.

◆ getSize()

template<typename T >
std::vector< int > carto::VolumeRef< T >::getSize ( ) const
inline

Definition at line 139 of file volumeref_d_inline.h.

Referenced by soma::VolumeUtilIO< T >::readPartial().

◆ getSizeT()

template<typename T >
int carto::VolumeRef< T >::getSizeT ( ) const
inline

◆ getSizeX()

template<typename T >
int carto::VolumeRef< T >::getSizeX ( ) const
inline

◆ getSizeY()

template<typename T >
int carto::VolumeRef< T >::getSizeY ( ) const
inline

◆ getSizeZ()

template<typename T >
int carto::VolumeRef< T >::getSizeZ ( ) const
inline

◆ getStrides()

template<typename T >
std::vector< size_t > carto::VolumeRef< T >::getStrides ( ) const
inline

Definition at line 439 of file volumeref_d_inline.h.

◆ getVoxelSize()

template<typename T >
std::vector< float > carto::VolumeRef< T >::getVoxelSize ( ) const
inline

Definition at line 202 of file volumeref_d_inline.h.

◆ header() [1/2]

template<typename T >
const PropertySet & carto::VolumeRef< T >::header ( ) const
inline

◆ header() [2/2]

template<typename T >
PropertySet & carto::VolumeRef< T >::header ( )
inline

Definition at line 181 of file volumeref_d_inline.h.

◆ initialize()

template<typename T >
void carto::VolumeRef< T >::initialize ( )
inlinevirtual

Definition at line 330 of file volumeref_d_inline.h.

◆ max()

template<typename T >
T carto::VolumeRef< T >::max ( ) const
inline

Definition at line 87 of file volumeref_d_operators.h.

◆ min()

template<typename T >
T carto::VolumeRef< T >::min ( ) const
inline

Definition at line 80 of file volumeref_d_operators.h.

◆ operator VolumeRef< OUTP >()

template<typename T >
template<typename OUTP >
carto::VolumeRef< T >::operator VolumeRef< OUTP > ( ) const
inline

Definition at line 172 of file volumeref_d_operators.h.

◆ operator()() [1/6]

template<typename T >
const T & carto::VolumeRef< T >::operator() ( long  x,
long  y = 0,
long  z = 0,
long  t = 0 
) const
inline

Definition at line 243 of file volumeref_d_inline.h.

◆ operator()() [2/6]

template<typename T >
T & carto::VolumeRef< T >::operator() ( long  x,
long  y = 0,
long  z = 0,
long  t = 0 
)
inline

Definition at line 250 of file volumeref_d_inline.h.

◆ operator()() [3/6]

template<typename T >
const T & carto::VolumeRef< T >::operator() ( const Position4Di position) const
inline

Definition at line 271 of file volumeref_d_inline.h.

◆ operator()() [4/6]

template<typename T >
T & carto::VolumeRef< T >::operator() ( const Position4Di position)
inline

Definition at line 278 of file volumeref_d_inline.h.

◆ operator()() [5/6]

template<typename T >
const T & carto::VolumeRef< T >::operator() ( const Position position) const
inline

Definition at line 299 of file volumeref_d_inline.h.

◆ operator()() [6/6]

template<typename T >
T & carto::VolumeRef< T >::operator() ( const Position position)
inline

Definition at line 306 of file volumeref_d_inline.h.

◆ operator*() [1/2]

template<typename T>
Volume<T>& carto::VolumeRef< T >::operator* ( )
inline

Definition at line 73 of file volumeref.h.

◆ operator*() [2/2]

template<typename T>
const Volume<T>& carto::VolumeRef< T >::operator* ( ) const
inline

Definition at line 78 of file volumeref.h.

◆ operator=()

template<typename T >
VolumeRef< T > & carto::VolumeRef< T >::operator= ( const T &  value)
inline

Definition at line 113 of file volumeref_d_operators.h.

◆ posInRefVolume()

template<typename T >
const VolumeRef< T >::Position4Di carto::VolumeRef< T >::posInRefVolume ( ) const
inline

Definition at line 392 of file volumeref_d_inline.h.

◆ posInRefVolumeAtLevel()

template<typename T >
Volume< T >::Position carto::VolumeRef< T >::posInRefVolumeAtLevel ( const int  level) const
inline

Definition at line 425 of file volumeref_d_inline.h.

◆ reallocate()

template<typename T >
void carto::VolumeRef< T >::reallocate ( int  sizeX = 1,
int  sizeY = 1,
int  sizeZ = 1,
int  sizeT = 1,
bool  keepcontents = false,
const AllocatorContext &  allocatorContext = AllocatorContext(),
bool  allocate = true 
)
inlinevirtual

◆ refLevel()

template<typename T >
int carto::VolumeRef< T >::refLevel ( const int  level) const
inline

Definition at line 413 of file volumeref_d_inline.h.

◆ refVolume()

template<typename T >
rc_ptr< Volume< T > > carto::VolumeRef< T >::refVolume ( ) const
inline

Definition at line 378 of file volumeref_d_inline.h.

◆ refVolumeAtLevel()

template<typename T >
rc_ptr< Volume< T > > carto::VolumeRef< T >::refVolumeAtLevel ( const int  level) const
inline

Definition at line 419 of file volumeref_d_inline.h.

◆ setPosInRefVolume() [1/2]

template<typename T >
void carto::VolumeRef< T >::setPosInRefVolume ( const Position4Di pos)
inline

Definition at line 399 of file volumeref_d_inline.h.

◆ setPosInRefVolume() [2/2]

template<typename T>
void carto::VolumeRef< T >::setPosInRefVolume ( const typename Volume< T >::Position pos)

◆ setRefVolume()

template<typename T >
void carto::VolumeRef< T >::setRefVolume ( const rc_ptr< Volume< T > > &  refvol)
inline

Definition at line 385 of file volumeref_d_inline.h.

◆ sum()

template<typename T >
DataTypeTraits< T >::LongType carto::VolumeRef< T >::sum ( ) const
inline

To avoid overflow, the biggest possible type (intmax_t, uintmax_t, double...) is used for computation and returned.

Definition at line 94 of file volumeref_d_operators.h.

◆ view() [1/2]

template<typename T >
VolumeRef< T > carto::VolumeRef< T >::view ( const Position4Di pos,
const Position4Di size 
)
inline

Definition at line 459 of file volumeref_d_inline.h.

◆ view() [2/2]

template<typename T >
const VolumeRef< T > carto::VolumeRef< T >::view ( const Position4Di pos,
const Position4Di size 
) const
inline

Definition at line 466 of file volumeref_d_inline.h.


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