cartodata  4.5.0
carto::Volume< T > Class Template Reference

4D Volume main class More...

#include <cartodata/io/volumeformatreader.h>

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

Classes

class  Position4Di
 

Public Types

typedef T datatype
 Access to T type. More...
 
typedef blitz::Array< T, 4 >
::iterator 
iterator
 The most "basic" (and fastest) iterators: they go from the first voxel linerarly in memory, not taking care of offsets when in a Volume view. More...
 
typedef blitz::Array< T, 4 >
::const_iterator 
const_iterator
 

Public Member Functions

 Volume (int sizeX=1, int sizeY=1, int sizeZ=1, int sizeT=1, const AllocatorContext &allocatorContext=AllocatorContext(), bool allocated=true)
 Volume construction and allocation. More...
 
 Volume (const Position4Di &size, const AllocatorContext &allocatorContext=AllocatorContext(), bool allocated=true)
 Volume construction and allocation: Position4Di version. More...
 
 Volume (int sizeX, int sizeY, int sizeZ, int sizeT, int bordersize, const AllocatorContext &allocatorContext=AllocatorContext(), bool allocated=true)
 Volume construction and allocation Same as the above constructor, but allows to specify a border size. More...
 
 Volume (const Position4Di &size, int bordersize, const AllocatorContext &allocatorContext=AllocatorContext(), bool allocated=true)
 Volume construction and allocation: Position4Di version Same as the above constructor, but allows to specify a border size. More...
 
 Volume (int sizeX, int sizeY, int sizeZ, int sizeT, const Position4Di &border, const AllocatorContext &allocatorContext=AllocatorContext(), bool allocated=true)
 Volume construction and allocation Same as the above constructor, but allows to specify a border size in each dimension. More...
 
 Volume (const Position4Di &size, const Position4Di &border, const AllocatorContext &allocatorContext=AllocatorContext(), bool allocated=true)
 Volume construction and allocation: Position4Di version Same as the above constructor, but allows to specify a border size in each dimension. More...
 
 Volume (int sizeX, int sizeY, int sizeZ, int sizeT, T *buffer)
 This constructor builds a Volume on an already allocated buffer. More...
 
 Volume (const Position4Di &size, T *buffer)
 Position4Di version This constructor builds a Volume on an already allocated buffer. More...
 
 Volume (rc_ptr< Volume< T > > other, const Position4Di &pos=Position4Di(0, 0, 0, 0), const Position4Di &size=Position4Di(-1,-1,-1,-1), const AllocatorContext &allocContext=AllocatorContext())
 This is the volume view constructor. More...
 
 Volume (const Volume< T > &other)
 Copy constructor The copy constructors actually duplicates data buffers. More...
 
virtual ~Volume ()
 
Volume< T > & operator= (const Volume< T > &other)
 
iterator begin ()
 Iterators returned here are the most "basic" (and fastest) iterators: they go from the first voxel linerarly in memory, not taking care of offsets when in a Volume view. More...
 
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
 Warning: this operator is not virtual, so may not have the expected result on inherited classes (see old VolumeView) More...
 
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 & at (const blitz::TinyVector< int, 1 > &) const
 
T & at (const blitz::TinyVector< int, 1 > &)
 
const T & at (const blitz::TinyVector< int, 2 > &) const
 
T & at (const blitz::TinyVector< int, 2 > &)
 
const T & at (const blitz::TinyVector< int, 3 > &) const
 
T & at (const blitz::TinyVector< int, 3 > &)
 
const T & at (const blitz::TinyVector< int, 4 > &) const
 
T & at (const blitz::TinyVector< int, 4 > &)
 
blitz::Array< T, 4 > at (const blitz::RectDomain< 4 > &subdomain) const
 
blitz::Array< T, 4 > at (const blitz::StridedDomain< 4 > &subdomain) const
 
blitz::Array< T, 4 > at (const blitz::Range &r0) const
 
blitz::Array< T, 4 > at (const blitz::Range &r0, const blitz::Range &r1) const
 
blitz::Array< T, 4 > at (const blitz::Range &r0, const blitz::Range &r1, const blitz::Range &r2) const
 
blitz::Array< T, 4 > at (const blitz::Range &r0, const blitz::Range &r1, const blitz::Range &r2, const blitz::Range &r3) const
 
virtual void initialize ()
 Initializes header info. More...
 
const AllocatorContext & allocatorContext () const
 returns volume's AllocatorContext More...
 
void allocate ()
 This function is only useful in the particular context of an unallocated Volume, when the constructor has been used with the allocated flag to false. More...
 
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)
 allows resizing and changing allocator More...
 
virtual void reallocate (const Position4Di &size, bool keepcontents=false, const AllocatorContext &allocatorContext=AllocatorContext(), bool allocate=true)
 
Volume< T > copy () const
 Create a volume of same dimension and copy the data. More...
 
template<typename OUTP >
Volume< OUTP > copy () const
 
Volume< T > deepcopy () const
 Copy the full data structure. More...
 
template<typename OUTP >
Volume< OUTP > deepcopy () const
 
Volume< T > copyStructure () const
 Copy the full data structure without copying the actual data. More...
 
template<typename OUTP >
Volume< OUTP > copyStructure () const
 Copy the full data structure without copying the actual data. More...
 
template<typename OUTP >
 operator Volume< OUTP > () const
 Cast to Volume of different datatype. More...
 
rc_ptr< Volume< T > > refVolume () const
 Get parent volume. More...
 
void setRefVolume (const rc_ptr< Volume< T > > &refvol)
 Set parent volume. More...
 
const Position4Di posInRefVolume () const
 Get position in parent volume. More...
 
void setPosInRefVolume (const Position4Di &pos)
 Set position in parent volume. More...
 
std::vector< int > getBorders () const
 Get borders for the volume. More...
 
std::vector< size_t > getStrides () const
 Get strides for the volume. More...
 
 operator bool () const
 Implicit cast to bool returns all() More...
 
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
 
sum () const
 
template<typename OUTP >
OUTP sum () const
 
void fill (const T &value)
 Fills the volume with a given value. More...
 
Volume< T > & operator= (const T &value)
 
- Public Member Functions inherited from carto::VolumeProxy< T >
 VolumeProxy (int sizeX=1, int sizeY=1, int sizeZ=1, int sizeT=1)
 
 VolumeProxy (const VolumeProxy< T > &other)
 
virtual ~VolumeProxy ()
 
int getSizeX () const
 
int getSizeY () const
 
int getSizeZ () const
 
int getSizeT () const
 
std::vector< int > getSize () const
 get the 4 dimensions in a vector More...
 
std::vector< float > getVoxelSize () const
 get the voxel size from the header, with 4 values defaulting to 1.mm if not present More...
 
VolumeProxy< T > & operator= (const VolumeProxy< T > &other)
 
virtual void copyHeaderFrom (const PropertySet &other)
 copy properties from other to this, avoiding forbidden properties like size. More...
 
virtual void copyHeaderFrom (const Object &other)
 
- Public Member Functions inherited from carto::Headered
 Headered ()
 
 Headered (const Headered &other)
 
virtual ~Headered ()
 
Headeredoperator= (const Headered &other)
 
const PropertySetheader () const
 
PropertySetheader ()
 
void addPropertyFilter (const rc_ptr< PropertyFilter > &propertyFilter)
 
bool hasPropertyFilter (const std::string &propertyFilterName) const
 
bool connect (const std::string &propertyFilterName, const PropertyFilter::Slot &slot)
 
bool disconnect (const std::string &propertyFilterName, const PropertyFilter::Slot &slot)
 
std::set< rc_ptr
< PropertyFilter > > 
getPropertyFilters (const std::string &propertyName) const
 
void delay ()
 
void flush ()
 
void blockSignals (bool)
 
bool signalsBlocked () const
 
std::string uuid ()
 
bool copyUuid (const PropertySet &)
 
bool copyUuid (const Headered &)
 
virtual ~Observer ()
 

Protected Member Functions

void allocate (int oldSizeX, int oldSizeY, int oldSizeZ, int oldSizeT, bool allocate, const AllocatorContext &allocatorContext)
 
void slotSizeChanged (const PropertyFilter &propertyFilter)
 
void updateItemsBuffer ()
 
void constructBorders (const Position4Di &bordersize, const AllocatorContext &allocatorContext, bool allocated)
 
- Protected Member Functions inherited from carto::Headered
 Observer ()
 

Protected Attributes

AllocatedVector< T > _items
 
blitz::Array< T, 4 > _blitz
 
rc_ptr< Volume< T > > _refvol
 
Position4Di _pos
 
- Protected Attributes inherited from carto::VolumeProxy< T >
int _sizeX
 
int _sizeY
 
int _sizeZ
 
int _sizeT
 

Detailed Description

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

4D Volume main class

Since 2013 release (version 4.4), Volume and VolumeView are merged into a singleclass. Every Volume can be a view into an other volume. If it is not, its parent volume is NULL. This allows to deal the same way with classic volumes, volumes with borders or partially read volumes.

Volumes should generally be used via reference-counting pointers (rc_ptr): there is a (slightly) specialized rc_ptr for Volume subclasses: VolumeRef.

Since 2016 release (version 4.5), comparison and arithmetic operators are specialized and shipped in volume.h. They can be used as long as the same operation between contained types is well defined. Several helper method (member and non member) are also included.

See also
Volumes concept philiosophy

To use Volume classes on "standard" types (numeric types, on which the Volume class has already been compiled in the libraries), just include <cartodata/volume/volume.h>. If you need to use them on other non-standard types (if you get a link error about missing symbols), you will need to recompile the Volume template class on these types: in this case you should include <cartodata/volume/volume_d.h> and force the compilation:

This should be done only once (in one source file) for each type.

Definition at line 50 of file volumeformatreader.h.

Member Typedef Documentation

template<typename T>
typedef blitz::Array<T,4>::const_iterator carto::Volume< T >::const_iterator

Definition at line 130 of file volumebase.h.

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

Access to T type.

Definition at line 119 of file volumebase.h.

template<typename T>
typedef blitz::Array<T,4>::iterator carto::Volume< T >::iterator

The most "basic" (and fastest) iterators: they go from the first voxel linerarly in memory, not taking care of offsets when in a Volume view.

Taking care of splitting loops line-by-line is the responsability of programmers using such

Definition at line 129 of file volumebase.h.

Constructor & Destructor Documentation

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

Volume construction and allocation.

Parameters
sizeXnumber of voxels
sizeYnumber of voxels
sizeZnumber of voxels
sizeTnumber of voxels
allocatorContextinformation about how to allocate the volume: it can be a bit complex to do really optimal things, but the default value (default constructor of AllocatorContext) is OK in most cases.
allocatednormally left to true, it can exceptionnally be set to false for "virtual" volumes that must not be actually allocated but are only sources for a view Volume.

Definition at line 70 of file volumebase_d.h.

References carto::Volume< T >::allocate().

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

Volume construction and allocation: Position4Di version.

Parameters
sizenumber of voxels in each dimension
allocatorContextinformation about how to allocate the volume: it can be a bit complex to do really optimal things, but the default value (default constructor of AllocatorContext) is OK in most cases.
allocatednormally left to true, it can exceptionnally be set to false for "virtual" volumes that must not be actually allocated but are only sources for a view Volume.

Definition at line 86 of file volumebase_d.h.

References carto::Volume< T >::allocate().

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

Volume construction and allocation Same as the above constructor, but allows to specify a border size.

Border is handled as a larger volume, with a view in it. The current volume is this view.

Definition at line 203 of file volumebase_d.h.

References carto::Volume< T >::constructBorders().

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

Volume construction and allocation: Position4Di version Same as the above constructor, but allows to specify a border size.

Border is handled as a larger volume, with a view in it. The current volume is this view.

Definition at line 222 of file volumebase_d.h.

References carto::Volume< T >::constructBorders().

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

Volume construction and allocation Same as the above constructor, but allows to specify a border size in each dimension.

Definition at line 164 of file volumebase_d.h.

References carto::Volume< T >::constructBorders().

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

Volume construction and allocation: Position4Di version Same as the above constructor, but allows to specify a border size in each dimension.

Definition at line 182 of file volumebase_d.h.

References carto::Volume< T >::constructBorders().

template<typename T >
carto::Volume< T >::Volume ( int  sizeX,
int  sizeY,
int  sizeZ,
int  sizeT,
T *  buffer 
)

This constructor builds a Volume on an already allocated buffer.

The Volume is not owner of the underlying data.

Definition at line 247 of file volumebase_d.h.

References carto::Volume< T >::allocate(), and carto::Volume< T >::allocatorContext().

template<typename T >
carto::Volume< T >::Volume ( const Position4Di size,
T *  buffer 
)

Position4Di version This constructor builds a Volume on an already allocated buffer.

The Volume is not owner of the underlying data.

Definition at line 261 of file volumebase_d.h.

References carto::Volume< T >::allocate(), and carto::Volume< T >::allocatorContext().

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

This is the volume view constructor.

Beware not to mix it up with the copy constructor ( it takes a pointer to volume instead of a volume ) If parent volume is allocated, view points to its data and doesn't own it. Else, it allocates size and owns it.

Definition at line 285 of file volumebase_d.h.

References carto::Volume< T >::_blitz, carto::Volume< T >::_items, carto::Volume< T >::allocate(), carto::DictionaryInterface::getProperty(), carto::Headered::header(), and carto::PropertySet::setProperty().

template<typename T >
carto::Volume< T >::Volume ( const Volume< T > &  other)

Copy constructor The copy constructors actually duplicates data buffers.

In the case of a volume view, the underlying volume is also duplicated, so the new volume will be a view in a new duplicate bigger volume.

Definition at line 369 of file volumebase_d.h.

References carto::Volume< T >::_blitz, carto::Volume< T >::_items, carto::Volume< T >::_refvol, carto::Volume< T >::allocate(), carto::Volume< T >::allocatorContext(), carto::rc_ptr< T >::get(), and carto::Volume< T >::posInRefVolume().

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

Definition at line 430 of file volumebase_d.h.

Member Function Documentation

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

True if all values compare to true.

Definition at line 129 of file volumebase_d_operators.h.

References carto::volumebaseinternal::select< T, is_scalar >::all().

template<typename T >
void carto::Volume< T >::allocate ( )

This function is only useful in the particular context of an unallocated Volume, when the constructor has been used with the allocated flag to false.

Calling allocate() afterwards will actually allocate the memory. Otherwise it will do nothing.

Definition at line 850 of file volumebase_d.h.

Referenced by carto::Volume< T >::Volume().

template<typename T >
void carto::Volume< T >::allocate ( int  oldSizeX,
int  oldSizeY,
int  oldSizeZ,
int  oldSizeT,
bool  allocate,
const AllocatorContext &  allocatorContext 
)
protected

Definition at line 697 of file volumebase_d.h.

References carto::toString().

template<typename T >
const AllocatorContext & carto::Volume< T >::allocatorContext ( ) const
inline
template<typename T >
bool carto::Volume< T >::any ( ) const
inline

True if at least one value compares to true.

Definition at line 136 of file volumebase_d_operators.h.

References carto::volumebaseinternal::select< T, is_scalar >::any().

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

Definition at line 48 of file volumebase_d_inline.h.

Referenced by carto::VolumeUtil< T >::accumulate().

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

Definition at line 71 of file volumebase_d_inline.h.

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

Definition at line 94 of file volumebase_d_inline.h.

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

Definition at line 110 of file volumebase_d_inline.h.

template<typename T >
const T & carto::Volume< T >::at ( const blitz::TinyVector< int, 1 > &  index) const
inline

Definition at line 126 of file volumebase_d_inline.h.

template<typename T >
T & carto::Volume< T >::at ( const blitz::TinyVector< int, 1 > &  index)
inline

Definition at line 132 of file volumebase_d_inline.h.

template<typename T >
const T & carto::Volume< T >::at ( const blitz::TinyVector< int, 2 > &  index) const
inline

Definition at line 138 of file volumebase_d_inline.h.

template<typename T >
T & carto::Volume< T >::at ( const blitz::TinyVector< int, 2 > &  index)
inline

Definition at line 144 of file volumebase_d_inline.h.

template<typename T >
const T & carto::Volume< T >::at ( const blitz::TinyVector< int, 3 > &  index) const
inline

Definition at line 150 of file volumebase_d_inline.h.

template<typename T >
T & carto::Volume< T >::at ( const blitz::TinyVector< int, 3 > &  index)
inline

Definition at line 156 of file volumebase_d_inline.h.

template<typename T >
const T & carto::Volume< T >::at ( const blitz::TinyVector< int, 4 > &  index) const
inline

Definition at line 162 of file volumebase_d_inline.h.

template<typename T >
T & carto::Volume< T >::at ( const blitz::TinyVector< int, 4 > &  index)
inline

Definition at line 168 of file volumebase_d_inline.h.

template<typename T >
blitz::Array< T, 4 > carto::Volume< T >::at ( const blitz::RectDomain< 4 > &  subdomain) const
inline

Definition at line 175 of file volumebase_d_inline.h.

template<typename T >
blitz::Array< T, 4 > carto::Volume< T >::at ( const blitz::StridedDomain< 4 > &  subdomain) const
inline

Definition at line 182 of file volumebase_d_inline.h.

template<typename T >
blitz::Array< T, 4 > carto::Volume< T >::at ( const blitz::Range &  r0) const
inline

Definition at line 189 of file volumebase_d_inline.h.

template<typename T >
blitz::Array< T, 4 > carto::Volume< T >::at ( const blitz::Range &  r0,
const blitz::Range &  r1 
) const
inline

Definition at line 196 of file volumebase_d_inline.h.

template<typename T >
blitz::Array< T, 4 > carto::Volume< T >::at ( const blitz::Range &  r0,
const blitz::Range &  r1,
const blitz::Range &  r2 
) const
inline

Definition at line 203 of file volumebase_d_inline.h.

template<typename T >
blitz::Array< T, 4 > carto::Volume< T >::at ( const blitz::Range &  r0,
const blitz::Range &  r1,
const blitz::Range &  r2,
const blitz::Range &  r3 
) const
inline

Definition at line 211 of file volumebase_d_inline.h.

template<typename T >
Volume< T >::iterator carto::Volume< T >::begin ( )

Iterators returned here are the most "basic" (and fastest) iterators: they go from the first voxel linerarly in memory, not taking care of offsets when in a Volume view.

Taking care of splitting loops line-by-line is the responsability of programmers using such iterators.

Definition at line 621 of file volumebase_d.h.

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

Definition at line 647 of file volumebase_d.h.

template<typename T >
void carto::Volume< T >::constructBorders ( const Position4Di bordersize,
const AllocatorContext &  allocatorContext,
bool  allocated 
)
protected

Definition at line 109 of file volumebase_d.h.

Referenced by carto::Volume< T >::Volume().

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

Create a volume of same dimension and copy the data.

This method does not deal with the underlying view structures, so borders or parent volumes are not copied or transfered.

Definition at line 203 of file volumebase_d_operators.h.

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

Copy the full data structure without copying the actual data.

Definition at line 233 of file volumebase_d_operators.h.

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

Copy the full data structure without copying the actual data.

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

Copy the full data structure.

This is similar to what the copy constructor does.

Definition at line 218 of file volumebase_d_operators.h.

Referenced by operator++(), and operator--().

template<typename T>
template<typename OUTP >
Volume<OUTP> carto::Volume< T >::deepcopy ( ) const
template<typename T >
Volume< T >::iterator carto::Volume< T >::end ( )

Definition at line 634 of file volumebase_d.h.

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

Definition at line 660 of file volumebase_d.h.

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

Fills the volume with a given value.

Definition at line 184 of file volumebase_d_operators.h.

References carto::volumeutil::selfApply().

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

Get borders for the volume.

A volume that can have borders is a volume
that references another volume. It can be understood as a view in the reference volume.

Returns
std::vector<uint16_t> that contains the borders availables for the volume. vector[0]: low border in x direction vector[1]: high border in x direction vector[2]: low border in y direction vector[3]: high border in y direction vector[4]: low border in z direction vector[5]: high border in z direction vector[6]: low border in t direction vector[7]: high border in t direction

Definition at line 543 of file volumebase_d.h.

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

Get strides for the volume.

Strides contain the number of voxels for
each dimension including.

Returns
std::vector<uint16_t> that contains the borders availables for the volume. vector[0]: number of voxels for the 0 dimension. Value is always 1 as no border is defined around each voxel. vector[1]: number of voxels for the 1st dimension, i.e. in a line including its borders. vector[2]: number of voxels for the 2nde dimension, i.e. in a slice including its borders. vector[3]: number of voxels for the 3rd dimension, i.e. in a volume including its borders.

Definition at line 562 of file volumebase_d.h.

template<typename T >
void carto::Volume< T >::initialize ( )
virtual
template<typename T >
T carto::Volume< T >::max ( ) const
inline
template<typename T >
T carto::Volume< T >::min ( ) const
inline
template<typename T >
carto::Volume< T >::operator bool ( ) const
inline

Implicit cast to bool returns all()

Definition at line 143 of file volumebase_d_operators.h.

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

Cast to Volume of different datatype.

Definition at line 249 of file volumebase_d_operators.h.

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

Warning: this operator is not virtual, so may not have the expected result on inherited classes (see old VolumeView)

Definition at line 63 of file volumebase_d_inline.h.

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

Definition at line 86 of file volumebase_d_inline.h.

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

Definition at line 102 of file volumebase_d_inline.h.

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

Definition at line 118 of file volumebase_d_inline.h.

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

Definition at line 191 of file volumebase_d_operators.h.

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

Get position in parent volume.

Definition at line 451 of file volumebase_d.h.

Referenced by soma::VolumeFormatReader< T >::read(), carto::Volume< T >::Volume(), and soma::VolumeFormatWriter< T >::write().

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

allows resizing and changing allocator

Definition at line 917 of file volumebase_d.h.

Referenced by carto::Creator< Volume< T > >::setup().

template<typename T >
void carto::Volume< T >::reallocate ( const Position4Di size,
bool  keepcontents = false,
const AllocatorContext &  allocatorContext = AllocatorContext(),
bool  allocate = true 
)
virtual

Definition at line 942 of file volumebase_d.h.

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

Get parent volume.

Note
refVolume() returns a rc_ptr<Volume> and not a VolumeRef. Because arithmetic operators are only defined for Volume and VolumeRef objects, this result must be converted to a VolumeRef to be used in arithmetic operations.

Definition at line 445 of file volumebase_d.h.

Referenced by soma::VolumeFormatReader< T >::read(), and soma::VolumeFormatWriter< T >::write().

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

Set position in parent volume.

Definition at line 527 of file volumebase_d.h.

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

Set parent volume.

Definition at line 535 of file volumebase_d.h.

template<typename T >
void carto::Volume< T >::slotSizeChanged ( const PropertyFilter propertyFilter)
protected
template<typename T >
OUTP carto::Volume< T >::sum ( ) const
inline
template<typename T>
template<typename OUTP >
OUTP carto::Volume< T >::sum ( ) const
template<typename T >
void carto::Volume< T >::updateItemsBuffer ( )
inlineprotected

Definition at line 457 of file volumebase_d.h.

References carto::DictionaryInterface::getProperty().

Member Data Documentation

template<typename T>
blitz::Array<T, 4> carto::Volume< T >::_blitz
protected

Definition at line 404 of file volumebase.h.

Referenced by carto::Volume< T >::Volume().

template<typename T>
AllocatedVector<T> carto::Volume< T >::_items
protected

Definition at line 402 of file volumebase.h.

Referenced by carto::Volume< T >::operator=(), and carto::Volume< T >::Volume().

template<typename T>
Position4Di carto::Volume< T >::_pos
protected

Definition at line 411 of file volumebase.h.

Referenced by carto::Volume< T >::operator=().

template<typename T>
rc_ptr<Volume<T> > carto::Volume< T >::_refvol
protected

Definition at line 410 of file volumebase.h.

Referenced by carto::Volume< T >::operator=(), and carto::Volume< T >::Volume().


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