aimstil
5.0.5
|
Image class using contiguous memory. More...
#include <til/ConstImageLinearIterator.h>
Public Types | |
typedef ImageC< T > | Self |
typedef T | value_type |
Public Member Functions | |
ImageC () | |
ImageC (const numeric_array< int, 3 > &dim, const numeric_array< t_voxsize, 3 > &vdim) | |
ImageC (const ImageParameter ¶m) | |
ImageC (T *data, const numeric_array< int, 3 > &dim, const numeric_array< t_voxsize, 3 > &vdim) | |
ImageC (const Self &im) | |
Shallow copy. More... | |
~ImageC () | |
Destructor. More... | |
void | init (T *data, const numeric_array< int, 3 > &dim, const numeric_array< t_voxsize, 3 > &vdim) |
void | init (const numeric_array< int, 3 > &dim, const numeric_array< t_voxsize, 3 > &vdim) |
void | init (const Self &im) |
void | init (const ImageParameter ¶m) |
T & | operator() (const numeric_array< int, 3 > &p) |
const T & | operator() (const numeric_array< int, 3 > &p) const |
void | setValue (const T &v, const numeric_array< int, 3 > &p) |
T | getUnsafeValue (const numeric_array< int, 3 > &p) const |
T * | getPointer () |
const T * | getPointer () const |
bool | isAllocated () const |
Check whether data has been allocated or not. More... | |
void | myreset () |
void | reset () |
Set all values to default value (0 for numerical types) More... | |
void | copy (const Self &im) |
Copy an image. More... | |
void | shallowCopy (const Self &im) |
Shallow copy of an image. More... | |
bool | operator!= (const Self &im) const |
Check whether images point on the same buffer. More... | |
bool | operator== (const Self &im) const |
Check whether images point on the same buffer. More... | |
![]() | |
const numeric_array< int, 3 > & | dim () const |
get image dimension More... | |
int | size () const |
Get total number of elements in image. More... | |
const numeric_array< t_voxsize, 3 > & | vdim () const |
get voxel size More... | |
void | set_vdim (const numeric_array< t_voxsize, 3 > &vdim) |
Set the voxel coordinates. More... | |
Friends | |
class | ConstVolumetricIterator< Self > |
Additional Inherited Members | |
![]() | |
void | set_dim (const numeric_array< int, 3 > &dim) |
bool | contains (const numeric_array< int, 3 > &p) const |
Image class using contiguous memory.
Definition at line 13 of file ConstImageLinearIterator.h.
typedef ImageC<T> til::ImageC< T >::Self |
typedef T til::ImageC< T >::value_type |
til::ImageC< T >::ImageC | ( | ) |
til::ImageC< T >::ImageC | ( | const numeric_array< int, 3 > & | dim, |
const numeric_array< t_voxsize, 3 > & | vdim | ||
) |
til::ImageC< T >::ImageC | ( | const ImageParameter & | param | ) |
til::ImageC< T >::ImageC | ( | T * | data, |
const numeric_array< int, 3 > & | dim, | ||
const numeric_array< t_voxsize, 3 > & | vdim | ||
) |
|
inline |
Shallow copy.
Definition at line 57 of file ImageC.h.
References til::ImageBase::dim(), til::ImageC< T >::init(), til::param(), til::ImageC< T >::shallowCopy(), til::ImageBase::vdim(), and til::ImageC< T >::~ImageC().
til::ImageC< T >::~ImageC | ( | ) |
void til::ImageC< T >::copy | ( | const Self & | im | ) |
Copy an image.
NB: it is put here, rather than in a separate function, for optimization reasons, that cannot be templated. Using memcopy is (supposedly) much faster than any iterator. But of course the use of memcopy depends on the implementation of the class. Also, there is intentionally no copy constructor or operator= in order that copy is always explicit.
Definition at line 436 of file ImageC.h.
References til::ImageBase::dim(), til::ImageC< T >::getPointer(), til::isAllocated(), til::ImageC< T >::isAllocated(), and til::ImageBase::vdim().
Referenced by til::ImageC< T >::myreset().
|
inline |
Definition at line 126 of file ImageC.h.
Referenced by til::ImageC< T >::copy(), til::ConstLinearIterator< ImageC< T > >::init(), and til::ImageC< T >::reset().
|
inline |
|
inline |
void til::ImageC< T >::init | ( | T * | data, |
const numeric_array< int, 3 > & | dim, | ||
const numeric_array< t_voxsize, 3 > & | vdim | ||
) |
Definition at line 345 of file ImageC.h.
References til::ImageBase::set_dim(), and til::ImageBase::set_vdim().
Referenced by til::ImageC< T >::ImageC().
void til::ImageC< T >::init | ( | const numeric_array< int, 3 > & | dim, |
const numeric_array< t_voxsize, 3 > & | vdim | ||
) |
Definition at line 302 of file ImageC.h.
References til::ImageC< T >::reset().
void til::ImageC< T >::init | ( | const Self & | im | ) |
void til::ImageC< T >::init | ( | const ImageParameter & | param | ) |
Definition at line 329 of file ImageC.h.
References til::ImageParameter::m_dim, and til::ImageParameter::m_vDim.
|
inline |
Check whether data has been allocated or not.
Definition at line 134 of file ImageC.h.
Referenced by til::ImageC< T >::copy().
|
inline |
Definition at line 137 of file ImageC.h.
References til::ImageC< T >::copy(), and til::ImageC< T >::reset().
|
inline |
|
inline |
|
inline |
|
inline |
void til::ImageC< T >::reset | ( | ) |
Set all values to default value (0 for numerical types)
Definition at line 386 of file ImageC.h.
References til::ImageC< T >::getPointer(), and til::ImageBase::size().
Referenced by til::ImageC< T >::init(), and til::ImageC< T >::myreset().
|
inline |
|
inline |
Shallow copy of an image.
A shallow copy does not duplicate the buffer: it points to the same buffer as the original image
Definition at line 159 of file ImageC.h.
References til::param().
Referenced by til::ImageC< T >::ImageC().
|
friend |