cartodata
5.0.5
|
N-D Volume main class. More...
#include <cartodata/io/volumeformatreader.h>
Classes | |
class | Position4Di |
Public Types | |
enum | { DIM_MAX = 8 } |
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 std::vector< int > | Position |
typedef T | datatype |
Access to T type. More... | |
typedef blitz::Array< T, Volume< T >::DIM_MAX >::iterator | iterator |
typedef blitz::Array< T, Volume< T >::DIM_MAX >::const_iterator | const_iterator |
![]() | |
typedef int | RefCounterType |
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 (const std::vector< int > &size, const AllocatorContext &allocatorContext=AllocatorContext(), bool allocated=true) | |
Volume construction and allocation: std::vector version Same as the above constructor, but allows to specify a border size in each dimension. More... | |
Volume (const std::vector< int > &size, const std::vector< int > &border, const AllocatorContext &allocatorContext=AllocatorContext(), bool allocated=true) | |
Volume construction and allocation: std::vector 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 (const std::vector< int > &size, T *buffer) | |
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 (rc_ptr< Volume< T > > other, const Position &pos, const Position &size=Position(), 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 std::vector< int > &) const |
T & | at (const std::vector< int > &) |
const T & | operator() (const std::vector< int > &position) const |
T & | operator() (const std::vector< int > &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 > &) |
const T & | at (const blitz::TinyVector< int, Volume< T >::DIM_MAX > &) const |
T & | at (const blitz::TinyVector< int, Volume< T >::DIM_MAX > &) |
blitz::Array< T, Volume< T >::DIM_MAX > | at (const blitz::RectDomain< Volume< T >::DIM_MAX > &subdomain) const |
blitz::Array< T, Volume< T >::DIM_MAX > | at (const blitz::StridedDomain< Volume< T >::DIM_MAX > &subdomain) const |
blitz::Array< T, Volume< T >::DIM_MAX > | at (const blitz::Range &r0) const |
blitz::Array< T, Volume< T >::DIM_MAX > | at (const blitz::Range &r0, const blitz::Range &r1) const |
blitz::Array< T, Volume< T >::DIM_MAX > | at (const blitz::Range &r0, const blitz::Range &r1, const blitz::Range &r2) const |
blitz::Array< T, Volume< T >::DIM_MAX > | at (const blitz::Range &r0, const blitz::Range &r1, const blitz::Range &r2, const blitz::Range &r3) const |
const T & | at (long x1, long x2, long x3, long x4, long x5, long x6=0, long x7=0, long x8=0) const |
T & | at (long x1, long x2, long x3, long x4, long x5, long x6=0, long x7=0, long x8=0) |
const T & | operator() (long x1, long x2, long x3, long x4, long x5, long x6=0, long x7=0, long x8=0) const |
T & | operator() (long x1, long x2, long x3, long x4, long x5, long x6=0, long x7=0, long x8=0) |
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) |
virtual void | reallocate (const std::vector< int > &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... | |
int | getLevelsCount () const |
Get levels count in volume hierarchy from the current volume to the topmost volume. More... | |
int | refLevel (const int level) const |
Transform a level index to a valid level index in the volume hierarchy. More... | |
rc_ptr< Volume< T > > | refVolume () const |
Get parent volume. More... | |
rc_ptr< Volume< T > > | refVolumeAtLevel (const int level) const |
Get parent volume at a specified level in volume hierarchy. More... | |
void | setRefVolume (const rc_ptr< Volume< T > > &refvol) |
Set parent volume. More... | |
const Position & | posInRefVolume () const |
Get position in parent volume. More... | |
Position | posInRefVolumeAtLevel (const int level) const |
Get position relatively to parent volume at specified level. More... | |
void | setPosInRefVolume (const Position4Di &pos) |
Set position in parent volume. More... | |
void | setPosInRefVolume (const Position &pos) |
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... | |
T | min () const |
T | 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... | |
void | fillBorder (const T &value) |
Fill border with a constant value. More... | |
Volume< T > & | operator= (const T &value) |
Copy operator. More... | |
![]() | |
VolumeProxy (int sizeX=1, int sizeY=1, int sizeZ=1, int sizeT=1) | |
VolumeProxy (const std::vector< int > &size) | |
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) |
![]() | |
Headered () | |
Headered (const Headered &other) | |
virtual | ~Headered () |
Headered & | operator= (const Headered &other) |
const PropertySet & | header () const |
PropertySet & | header () |
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 &) |
![]() | |
RCObject () | |
RCObject (const RCObject &) | |
RCObject & | operator= (const RCObject &) |
virtual | ~RCObject () |
![]() | |
virtual | ~Observer () |
Protected Member Functions | |
void | allocate (int oldSizeX, int oldSizeY, int oldSizeZ, int oldSizeT, bool allocate, const AllocatorContext &allocatorContext) |
void | allocate (const std::vector< int > &oldSize, bool allocate, const AllocatorContext &allocatorContext) |
void | slotSizeChanged (const PropertyFilter &propertyFilter) |
void | updateItemsBuffer () |
void | constructBorders (const Position &bordersize, const AllocatorContext &allocatorContext, bool allocated) |
![]() | |
Observer () | |
Protected Attributes | |
AllocatedVector< T > | _items |
blitz::Array< T, Volume< T >::DIM_MAX > | _blitz |
rc_ptr< Volume< T > > | _refvol |
std::vector< int > | _pos |
![]() | |
std::vector< int > | _size |
N-D 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.
In version 4.6 Volume has extended support from 4D to N-D, still limited to a fixed max number of dimensions at compilation time (normally set to 8).
Iterating on volumes is described in Iterating over volumes
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.
typedef blitz::Array<T,Volume<T>::DIM_MAX>::const_iterator carto::Volume< T >::const_iterator |
Definition at line 146 of file volumebase.h.
typedef T carto::Volume< T >::datatype |
Access to T type.
Definition at line 135 of file volumebase.h.
typedef blitz::Array<T,Volume<T>::DIM_MAX>::iterator carto::Volume< T >::iterator |
Definition at line 145 of file volumebase.h.
typedef std::vector<int> carto::Volume< T >::Position |
Definition at line 131 of file volumebase.h.
anonymous enum |
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
Enumerator | |
---|---|
DIM_MAX |
Definition at line 144 of file volumebase.h.
|
explicit |
Volume construction and allocation.
sizeX | number of voxels |
sizeY | number of voxels |
sizeZ | number of voxels |
sizeT | number of voxels |
allocatorContext | information 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. |
allocated | normally 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().
|
explicit |
Volume construction and allocation: Position4Di version.
size | number of voxels in each dimension |
allocatorContext | information 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. |
allocated | normally 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().
|
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 206 of file volumebase_d.h.
References carto::Volume< T >::_pos, and carto::Volume< T >::constructBorders().
|
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 230 of file volumebase_d.h.
References carto::Volume< T >::_pos, and carto::Volume< T >::constructBorders().
|
explicit |
Volume construction and allocation Same as the above constructor, but allows to specify a border size in each dimension.
Definition at line 167 of file volumebase_d.h.
References carto::Volume< T >::allocatorContext(), carto::Volume< T >::constructBorders(), and carto::Volume< T >::Position4Di::toVector().
|
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 185 of file volumebase_d.h.
References carto::Volume< T >::allocatorContext(), carto::Volume< T >::constructBorders(), and carto::Volume< T >::Position4Di::toVector().
|
explicit |
Volume construction and allocation: std::vector version Same as the above constructor, but allows to specify a border size in each dimension.
Definition at line 257 of file volumebase_d.h.
References carto::Volume< T >::allocate().
|
explicit |
Volume construction and allocation: std::vector version Same as the above constructor, but allows to specify a border size in each dimension.
Definition at line 274 of file volumebase_d.h.
References carto::Volume< T >::_pos, and carto::Volume< T >::constructBorders().
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 297 of file volumebase_d.h.
References carto::Volume< T >::allocate(), and carto::Volume< T >::allocatorContext().
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 312 of file volumebase_d.h.
References carto::Volume< T >::allocate(), and carto::Volume< T >::allocatorContext().
carto::Volume< T >::Volume | ( | const std::vector< int > & | size, |
T * | buffer | ||
) |
Definition at line 333 of file volumebase_d.h.
References carto::Volume< T >::allocate(), and carto::Volume< T >::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 351 of file volumebase_d.h.
References carto::Volume< T >::_blitz, carto::Volume< T >::_items, carto::Volume< T >::allocate(), carto::VolumeProxy< T >::getSize(), carto::Headered::header(), carto::PropertySet::setProperty(), carto::Volume< T >::Position4Di::size(), and carto::Volume< T >::Position4Di::toVector().
|
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 440 of file volumebase_d.h.
References carto::Volume< T >::_blitz, carto::Volume< T >::_items, carto::Volume< T >::allocate(), carto::VolumeProxy< T >::getSize(), carto::Headered::header(), and carto::PropertySet::setProperty().
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 526 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().
|
virtual |
Definition at line 586 of file volumebase_d.h.
|
inline |
True if all values compare to true.
Definition at line 144 of file volumebase_d_operators.h.
References carto::volumebaseinternal::select_has_bool_conversion< T, has_bool_conversion >::all().
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 1129 of file volumebase_d.h.
References carto::Volume< T >::allocatorContext().
Referenced by carto::Volume< T >::allocate(), carto::Volume< T >::constructBorders(), carto::Volume< T >::reallocate(), carto::Volume< T >::slotSizeChanged(), and carto::Volume< T >::Volume().
|
protected |
Definition at line 951 of file volumebase_d.h.
References carto::Volume< T >::allocate().
|
protected |
Definition at line 968 of file volumebase_d.h.
References carto::Volume< T >::_blitz, carto::Volume< T >::_items, carto::min(), and carto::toString().
|
inline |
returns volume's AllocatorContext
Definition at line 595 of file volumebase_d.h.
References carto::Volume< T >::_items.
Referenced by carto::Volume< T >::allocate(), carto::Volume< T >::constructBorders(), carto::copyStructure(), carto::deepcopy(), carto::Volume< T >::operator=(), soma::VolumeFormatReader< T >::read(), soma::VolumeUtilIO< T >::readFull(), carto::setBorders(), carto::setMinBorders(), carto::Creator< Volume< T > >::setup(), carto::Volume< T >::slotSizeChanged(), carto::Volume< T >::updateItemsBuffer(), carto::Volume< T >::Volume(), and soma::VolumeFormatWriter< T >::write().
|
inline |
True if at least one value compares to true.
Definition at line 151 of file volumebase_d_operators.h.
References carto::volumebaseinternal::select_has_bool_conversion< T, has_bool_conversion >::any().
|
inline |
Definition at line 48 of file volumebase_d_inline.h.
Referenced by carto::VolumeUtil< T >::accumulate(), carto::max(), and carto::min().
|
inline |
Definition at line 81 of file volumebase_d_inline.h.
|
inline |
Definition at line 128 of file volumebase_d_inline.h.
|
inline |
Definition at line 144 of file volumebase_d_inline.h.
|
inline |
Definition at line 159 of file volumebase_d_inline.h.
|
inline |
Definition at line 322 of file volumebase_d_inline.h.
|
inline |
Definition at line 498 of file volumebase_d_inline.h.
|
inline |
Definition at line 504 of file volumebase_d_inline.h.
|
inline |
Definition at line 510 of file volumebase_d_inline.h.
|
inline |
Definition at line 516 of file volumebase_d_inline.h.
|
inline |
Definition at line 522 of file volumebase_d_inline.h.
|
inline |
Definition at line 528 of file volumebase_d_inline.h.
|
inline |
Definition at line 534 of file volumebase_d_inline.h.
|
inline |
Definition at line 540 of file volumebase_d_inline.h.
|
inline |
Definition at line 546 of file volumebase_d_inline.h.
|
inline |
Definition at line 552 of file volumebase_d_inline.h.
|
inline |
Definition at line 559 of file volumebase_d_inline.h.
|
inline |
Definition at line 566 of file volumebase_d_inline.h.
|
inline |
Definition at line 573 of file volumebase_d_inline.h.
|
inline |
Definition at line 580 of file volumebase_d_inline.h.
|
inline |
Definition at line 587 of file volumebase_d_inline.h.
|
inline |
Definition at line 595 of file volumebase_d_inline.h.
|
inline |
Definition at line 603 of file volumebase_d_inline.h.
|
inline |
Definition at line 620 of file volumebase_d_inline.h.
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 874 of file volumebase_d.h.
References carto::Volume< T >::_blitz, and carto::Volume< T >::_items.
Volume< T >::const_iterator carto::Volume< T >::begin | ( | ) | const |
Definition at line 900 of file volumebase_d.h.
References carto::Volume< T >::_blitz, and carto::Volume< T >::_items.
|
protected |
Definition at line 109 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 >::reset(), and carto::Volume< T >::Position4Di::toVector().
Referenced by carto::Volume< T >::Volume().
|
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 299 of file volumebase_d_operators.h.
|
inline |
Copy the full data structure without copying the actual data.
Definition at line 329 of file volumebase_d_operators.h.
Volume<OUTP> carto::Volume< T >::copyStructure | ( | ) | const |
Copy the full data structure without copying the actual data.
|
inline |
Copy the full data structure.
This is similar to what the copy constructor does.
Definition at line 314 of file volumebase_d_operators.h.
Referenced by carto::operator++(), and carto::operator--().
Volume< T >::iterator carto::Volume< T >::end | ( | ) |
Definition at line 887 of file volumebase_d.h.
References carto::Volume< T >::_blitz, and carto::Volume< T >::_items.
Volume< T >::const_iterator carto::Volume< T >::end | ( | ) | const |
Definition at line 913 of file volumebase_d.h.
References carto::Volume< T >::_blitz, and carto::Volume< T >::_items.
|
inline |
Fills the volume with a given value.
Definition at line 192 of file volumebase_d_operators.h.
References carto::volumeutil::selfApply().
|
inline |
Fill border with a constant value.
Fill borders with a constant value.
More precisely, fill the surrounding of the volume view in the reference volume (if any) using the given value.
Definition at line 208 of file volumebase_d_operators.h.
|
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.
Definition at line 787 of file volumebase_d.h.
References carto::Volume< T >::_pos, carto::Volume< T >::_refvol, and carto::rc_ptr< T >::get().
Referenced by carto::setBorders(), and carto::setMinBorders().
|
inline |
Get levels count in volume hierarchy from the current volume to the topmost volume.
Definition at line 614 of file volumebase_d.h.
References carto::const_ref< T >::isNull().
Referenced by carto::Volume< T >::refLevel().
|
inline |
Get strides for the volume.
Strides contain the number of voxels for
each dimension including.
Definition at line 806 of file volumebase_d.h.
References carto::Volume< T >::_blitz.
|
virtual |
Initializes header info.
Reimplemented from carto::Headered.
Definition at line 926 of file volumebase_d.h.
References carto::Headered::addPropertyFilter(), carto::Headered::connect(), and carto::Headered::initialize().
Referenced by carto::Volume< T >::operator=().
|
inline |
Definition at line 172 of file volumebase_d_operators.h.
References carto::volumebaseinternal::select_is_scalar< T, is_scalar >::max().
|
inline |
Definition at line 165 of file volumebase_d_operators.h.
References carto::volumebaseinternal::select_is_scalar< T, is_scalar >::min().
|
inline |
Implicit cast to bool returns all()
Definition at line 158 of file volumebase_d_operators.h.
References carto::volumebaseinternal::select_has_bool_conversion< T, has_bool_conversion >::all().
|
inline |
Cast to Volume of different datatype.
Definition at line 345 of file volumebase_d_operators.h.
|
inline |
Warning: this operator is not virtual, so may not have the expected result on inherited classes (see old VolumeView)
Definition at line 73 of file volumebase_d_inline.h.
|
inline |
Definition at line 120 of file volumebase_d_inline.h.
|
inline |
Definition at line 136 of file volumebase_d_inline.h.
|
inline |
Definition at line 152 of file volumebase_d_inline.h.
|
inline |
Definition at line 484 of file volumebase_d_inline.h.
|
inline |
Definition at line 491 of file volumebase_d_inline.h.
|
inline |
Definition at line 612 of file volumebase_d_inline.h.
|
inline |
Definition at line 630 of file volumebase_d_inline.h.
Volume< T > & carto::Volume< T >::operator= | ( | const Volume< T > & | other | ) |
Definition at line 828 of file volumebase_d.h.
References carto::Volume< T >::_blitz, carto::Volume< T >::_items, carto::Volume< T >::_pos, carto::Volume< T >::_refvol, carto::Volume< T >::allocatorContext(), carto::Headered::blockSignals(), carto::Volume< T >::initialize(), carto::VolumeProxy< T >::operator=(), and carto::Headered::signalsBlocked().
|
inline |
Copy operator.
Care should be taken regarding the behavior of the copy operator: depending on the allocation mode of the copied volume, and whether it is a view into another volume, different behaviors will be achieved:
Definition at line 199 of file volumebase_d_operators.h.
|
inline |
Get position in parent volume.
Definition at line 607 of file volumebase_d.h.
References carto::Volume< T >::_pos.
Referenced by carto::copyStructure(), carto::deepcopy(), soma::VolumeFormatReader< T >::read(), carto::Volume< T >::Volume(), and soma::VolumeFormatWriter< T >::write().
|
inline |
Get position relatively to parent volume at specified level.
Definition at line 659 of file volumebase_d.h.
References carto::VolumeProxy< T >::getSize(), carto::const_ref< T >::isNull(), and carto::Volume< T >::refLevel().
|
virtual |
allows resizing and changing allocator
Definition at line 1187 of file volumebase_d.h.
References carto::Volume< T >::allocate().
Referenced by carto::Volume< T >::reallocate(), carto::setBorders(), carto::setMinBorders(), and carto::Creator< Volume< T > >::setup().
|
virtual |
Definition at line 1213 of file volumebase_d.h.
References carto::Volume< T >::reallocate().
|
virtual |
Definition at line 1226 of file volumebase_d.h.
References carto::Volume< T >::allocate(), carto::PropertySet::changeBuiltinProperty(), and carto::Headered::header().
|
inline |
Transform a level index to a valid level index in the volume hierarchy.
The current volume has level 0, parent volume as level 1, ... Level can also be a negative index from topmost volume. -1 is topmost volume, -2 is the the child volume below topmost volume.
Definition at line 626 of file volumebase_d.h.
References carto::Volume< T >::getLevelsCount(), and carto::toString().
Referenced by carto::Volume< T >::posInRefVolumeAtLevel(), and carto::Volume< T >::refVolumeAtLevel().
|
inline |
Get parent volume.
Definition at line 601 of file volumebase_d.h.
References carto::Volume< T >::_refvol.
Referenced by carto::copyStructure(), carto::deepcopy(), soma::VolumeFormatReader< T >::read(), and soma::VolumeFormatWriter< T >::write().
|
inline |
Get parent volume at a specified level in volume hierarchy.
Definition at line 644 of file volumebase_d.h.
References carto::const_ref< T >::isNull(), and carto::Volume< T >::refLevel().
|
inline |
Set position in parent volume.
Definition at line 757 of file volumebase_d.h.
References carto::Volume< T >::_pos, carto::Volume< T >::Position4Di::toVector(), and carto::Volume< T >::updateItemsBuffer().
Referenced by carto::setBorders(), and carto::setMinBorders().
|
inline |
Definition at line 768 of file volumebase_d.h.
References carto::Volume< T >::_pos, and carto::Volume< T >::updateItemsBuffer().
|
inline |
Set parent volume.
Definition at line 779 of file volumebase_d.h.
References carto::Volume< T >::_refvol, carto::rc_ptr< T >::get(), and carto::Volume< T >::updateItemsBuffer().
Referenced by carto::setBorders(), and carto::setMinBorders().
|
protected |
Definition at line 1137 of file volumebase_d.h.
References carto::Volume< T >::_items, carto::Volume< T >::allocate(), carto::Volume< T >::allocatorContext(), carto::PropertyFilter::getOldValue(), carto::PropertyFilter::hasOldValue(), and carto::DataTypeCode< class >::name().
|
inline |
To avoid overflow, the biggest possible type (intmax_t, uintmax_t, double...) is used for computation and returned.
Definition at line 179 of file volumebase_d_operators.h.
References carto::volumebaseinternal::select_is_scalar< T, is_scalar >::sum().
|
inlineprotected |
Definition at line 680 of file volumebase_d.h.
References carto::Volume< T >::_blitz, carto::Volume< T >::_items, carto::Volume< T >::_pos, carto::Volume< T >::_refvol, carto::Volume< T >::allocatorContext(), carto::rc_ptr< T >::get(), carto::Headered::header(), and carto::PropertySet::setProperty().
Referenced by carto::Volume< T >::setPosInRefVolume(), and carto::Volume< T >::setRefVolume().
|
protected |
Definition at line 516 of file volumebase.h.
Referenced by carto::Volume< T >::allocate(), carto::Volume< T >::begin(), carto::Volume< T >::constructBorders(), carto::Volume< T >::end(), carto::Volume< T >::getStrides(), carto::Volume< T >::operator=(), carto::Volume< T >::updateItemsBuffer(), and carto::Volume< T >::Volume().
|
protected |
Definition at line 514 of file volumebase.h.
Referenced by carto::Volume< T >::allocate(), carto::Volume< T >::allocatorContext(), carto::Volume< T >::begin(), carto::Volume< T >::constructBorders(), carto::Volume< T >::end(), carto::Volume< T >::operator=(), carto::Volume< T >::slotSizeChanged(), carto::Volume< T >::updateItemsBuffer(), and carto::Volume< T >::Volume().
|
protected |
Definition at line 523 of file volumebase.h.
Referenced by carto::Volume< T >::getBorders(), carto::Volume< T >::operator=(), carto::Volume< T >::posInRefVolume(), carto::Volume< T >::setPosInRefVolume(), carto::Volume< T >::updateItemsBuffer(), and carto::Volume< T >::Volume().
|
protected |
Definition at line 522 of file volumebase.h.
Referenced by carto::Volume< T >::constructBorders(), carto::Volume< T >::getBorders(), carto::Volume< T >::operator=(), carto::Volume< T >::refVolume(), carto::Volume< T >::setRefVolume(), carto::Volume< T >::updateItemsBuffer(), and carto::Volume< T >::Volume().