T3DImage< T > Class Template Reference

Specific type of the 3D images that hold real pixel data. More...

#include <mia/3d/image.hh>

Inheritance diagram for T3DImage< T >:
[legend]
Collaboration diagram for T3DImage< T >:
[legend]

Public Types

typedef C3DImage Super
 define the super class of this class for generic processing More...
 
- Public Types inherited from C3DImage
typedef C3DBounds dimsize_type
 generic type for the dimension of the image More...
 
typedef std::shared_ptr< C3DImagePointer
 Pointer type of the image. More...
 

Public Member Functions

const_iterator begin () const
 constant iterator More...
 
iterator begin ()
 read/write iterator, issues copy-on-write More...
 
const_iterator begin_at (size_t x, size_t y, size_t z) const
 constant iterator starting at the given location More...
 
iterator begin_at (size_t x, size_t y, size_t z)
 read/write iterator starting at the given location More...
 
range_iterator begin_range (const C3DBounds &begin, const C3DBounds &end)
 forwarding function to access the specified range of the underlying T3DDatafield More...
 
const_range_iterator begin_range (const C3DBounds &begin, const C3DBounds &end) const
 forwarding function to access the specified range of the underlying T3DDatafield More...
 
range_iterator_with_boundary_flag begin_range_with_boundary_flags (const C3DBounds &begin, const C3DBounds &end)
 
const_range_iterator_with_boundary_flag begin_range_with_boundary_flags (const C3DBounds &begin, const C3DBounds &end) const
 
virtual Pointer clone () const
 
const T3DDatafield< T > & data () const
 read only access to the underlying data More...
 
const_iterator end () const
 constant iterator More...
 
iterator end ()
 read/write iterator, issues copy-on-write More...
 
range_iterator end_range (const C3DBounds &begin, const C3DBounds &end)
 forwarding function to access the specified range of the underlying T3DDatafield More...
 
const_range_iterator end_range (const C3DBounds &begin, const C3DBounds &end) const
 forwarding function to access the specified range of the underlying T3DDatafield More...
 
range_iterator_with_boundary_flag end_range_with_boundary_flags (const C3DBounds &begin, const C3DBounds &end)
 
const_range_iterator_with_boundary_flag end_range_with_boundary_flags (const C3DBounds &begin, const C3DBounds &end) const
 
void get_data_line_x (int y, int z, std::vector< T > &buffer) const
 
void get_data_line_y (int x, int z, std::vector< T > &buffer) const
 
void get_data_line_z (int x, int y, std::vector< T > &buffer) const
 
T2DImage< T > get_data_plane_xy (size_t z) const
 forwarding function to access the underlying T3DDatafield More...
 
T2DImage< T > get_data_plane_xz (size_t y) const
 forwarding function to access the underlying T3DDatafield More...
 
T2DImage< T > get_data_plane_yz (size_t x) const
 forwarding function to access the underlying T3DDatafield More...
 
C3DFVector get_gradient (int index) const
 read/write access to the underlying data More...
 
std::pair< double, double > get_minmax_intensity () const
 
virtual const C3DBoundsget_size () const
 
const_reference operator() (size_t x, size_t y, size_t z) const
 element access operator - read only More...
 
reference operator() (size_t x, size_t y, size_t z)
 element access operator - read/write More...
 
const_reference operator() (const C3DBounds &l) const
 element access operator - read only More...
 
reference operator() (const C3DBounds &l)
 element access operator - read/write More...
 
T3DImageoperator= (const T3DImage< T > &orig)
 
T3DImageoperator= (T3DImage< T > &&orig)
 
const_reference operator[] (int i) const
 
reference operator[] (int i)
 
void put_data_line_x (int y, int z, const std::vector< T > &buffer)
 
void put_data_line_y (int x, int z, const std::vector< T > &buffer)
 
void put_data_line_z (int x, int y, const std::vector< T > &buffer)
 
void put_data_plane_xy (size_t z, const T2DImage< T > &p)
 forwarding function to access the underlying T3DDatafield More...
 
void put_data_plane_xz (size_t y, const T2DImage< T > &p)
 forwarding function to access the underlying T3DDatafield More...
 
void put_data_plane_yz (size_t x, const T2DImage< T > &p)
 forwarding function to access the underlying T3DDatafield More...
 
size_t size () const
 
 T3DImage (const C3DBounds &size, const T *init_data)
 
 T3DImage (const C3DBounds &size, const CAttributedData &attr)
 
 T3DImage (const C3DBounds &size, const data_array &init_data)
 
 T3DImage (const C3DBounds &size)
 
 T3DImage (const T3DImage< T > &orig)
 
 T3DImage (T3DImage< T > &&orig)
 
 T3DImage (const T3DDatafield< T > &orig)
 
 T3DImage ()
 
- Public Member Functions inherited from C3DImage
E3DImageOrientation get_orientation () const
 
C3DFVector get_origin () const
 
EPixelType get_pixel_type () const
 
C3DRotation get_rotation () const
 
C3DFVector get_voxel_size () const
 
void set_orientation (E3DImageOrientation orient)
 
void set_origin (const C3DFVector &voxel)
 set the origin i.e. world units of the pixel at (0,0,0) More...
 
void set_rotation (const C3DRotation &voxel)
 set the rotation about the origin of the image More...
 
void set_voxel_size (const C3DFVector &voxel)
 set the voxel size on world units More...
 
virtual ~C3DImage ()
 
- Public Member Functions inherited from CAttributedData
CAttributeMap::const_iterator begin_attributes () const
 
void delete_attribute (const std::string &key)
 
CAttributeMap::const_iterator end_attributes () const
 
const PAttribute get_attribute (const std::string &key) const
 
template<typename T >
const T get_attribute_as (const std::string &key) const
 
template<typename T >
const T get_attribute_as (const std::string &key, T default_value) const
 
const std::string get_attribute_as_string (const std::string &key) const
 returns the requested attribute as string, returns an empty string if attribute doesn't exist More...
 
bool has_attribute (const std::string &key) const
 
CAttributedDataoperator= (const CAttributedData &org)
 Assignemt operator. More...
 
void print (std::ostream &os) const
 
void set_attribute (const std::string &key, PAttribute attr)
 
void set_attribute (const std::string &key, const std::string &value)
 
template<typename T >
void set_attribute (const std::string &key, const T &value)
 
void set_attribute (const std::string &key, const char *value)
 
void set_attributes (CAttributeMap::const_iterator begin, CAttributeMap::const_iterator end)
 
 CAttributedData ()
 
 CAttributedData (const CAttributedData &org)
 
 CAttributedData (PAttributeMap attr)
 

Additional Inherited Members

- Static Public Attributes inherited from C3DImage
static const char * data_descr
 data type description for the plug-in path component More...
 
- Protected Member Functions inherited from C3DImage
 C3DImage (const CAttributedData &data, EPixelType type)
 
 C3DImage (EPixelType type)
 
 C3DImage ()
 standard constructor More...
 

Detailed Description

template<typename T>
class T3DImage< T >

Specific type of the 3D images that hold real pixel data.

This template defines a 3D image holding a certain type T as pixel type.

Definition at line 148 of file 3d/image.hh.

Member Typedef Documentation

◆ Super

template<typename T>
typedef C3DImage T3DImage< T >::Super

define the super class of this class for generic processing

Definition at line 151 of file 3d/image.hh.

Constructor & Destructor Documentation

◆ T3DImage() [1/8]

template<typename T>
T3DImage< T >::T3DImage ( const C3DBounds size,
const T *  init_data 
)

Construct a new image of a given size and with the given input date.

Parameters
size
init_datainput data

◆ T3DImage() [2/8]

template<typename T>
T3DImage< T >::T3DImage ( const C3DBounds size,
const CAttributedData attr 
)

Construct a new image of a given size and with the given attribute list.

Parameters
size
attr

◆ T3DImage() [3/8]

template<typename T>
T3DImage< T >::T3DImage ( const C3DBounds size,
const data_array &  init_data 
)

◆ T3DImage() [4/8]

template<typename T>
T3DImage< T >::T3DImage ( const C3DBounds size)
explicit

Construct a new image of a given size

Parameters
size

◆ T3DImage() [5/8]

template<typename T>
T3DImage< T >::T3DImage ( const T3DImage< T > &  orig)

copy constructor

◆ T3DImage() [6/8]

template<typename T>
T3DImage< T >::T3DImage ( T3DImage< T > &&  orig)

move constructor

◆ T3DImage() [7/8]

template<typename T>
T3DImage< T >::T3DImage ( const T3DDatafield< T > &  orig)
explicit

Constructor to create the image by using a 3D data field

Parameters
origthe input data field

◆ T3DImage() [8/8]

template<typename T>
T3DImage< T >::T3DImage ( )

standart costructor creates an image of size (0,0,0)

Member Function Documentation

◆ begin() [1/2]

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

constant iterator

Definition at line 288 of file 3d/image.hh.

Referenced by FConvert3DImageToPixeltypeO< O >::operator()().

◆ begin() [2/2]

template<typename T>
iterator T3DImage< T >::begin ( )
inline

read/write iterator, issues copy-on-write

Definition at line 344 of file 3d/image.hh.

◆ begin_at() [1/2]

template<typename T>
const_iterator T3DImage< T >::begin_at ( size_t  x,
size_t  y,
size_t  z 
) const
inline

constant iterator starting at the given location

Definition at line 354 of file 3d/image.hh.

Referenced by FDeformer3D::operator()().

◆ begin_at() [2/2]

template<typename T>
iterator T3DImage< T >::begin_at ( size_t  x,
size_t  y,
size_t  z 
)
inline

read/write iterator starting at the given location

Definition at line 359 of file 3d/image.hh.

◆ begin_range() [1/2]

template<typename T>
range_iterator T3DImage< T >::begin_range ( const C3DBounds begin,
const C3DBounds end 
)
inline

forwarding function to access the specified range of the underlying T3DDatafield

Definition at line 298 of file 3d/image.hh.

◆ begin_range() [2/2]

template<typename T>
const_range_iterator T3DImage< T >::begin_range ( const C3DBounds begin,
const C3DBounds end 
) const
inline

forwarding function to access the specified range of the underlying T3DDatafield

Definition at line 308 of file 3d/image.hh.

◆ begin_range_with_boundary_flags() [1/2]

template<typename T>
range_iterator_with_boundary_flag T3DImage< T >::begin_range_with_boundary_flags ( const C3DBounds begin,
const C3DBounds end 
)
inline
Returns
an read/write forward iterator over a subset of the data with indicator for the boundaries.

Definition at line 319 of file 3d/image.hh.

◆ begin_range_with_boundary_flags() [2/2]

template<typename T>
const_range_iterator_with_boundary_flag T3DImage< T >::begin_range_with_boundary_flags ( const C3DBounds begin,
const C3DBounds end 
) const
inline
Returns
an read/write forward iterator over a subset of the data with indicator for the boundaries. The functions ensures, that the field uses a single referenced datafield

Definition at line 331 of file 3d/image.hh.

◆ clone()

template<typename T>
virtual Pointer T3DImage< T >::clone ( ) const
virtual
Returns
a clone of the image with shared image data

Implements C3DImage.

◆ data()

template<typename T>
const T3DDatafield<T>& T3DImage< T >::data ( ) const

read only access to the underlying data

Referenced by FDeformer3D::operator()().

◆ end() [1/2]

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

constant iterator

Definition at line 293 of file 3d/image.hh.

Referenced by FConvert3DImageToPixeltypeO< O >::operator()().

◆ end() [2/2]

template<typename T>
iterator T3DImage< T >::end ( )
inline

read/write iterator, issues copy-on-write

Definition at line 349 of file 3d/image.hh.

◆ end_range() [1/2]

template<typename T>
range_iterator T3DImage< T >::end_range ( const C3DBounds begin,
const C3DBounds end 
)
inline

forwarding function to access the specified range of the underlying T3DDatafield

Definition at line 303 of file 3d/image.hh.

◆ end_range() [2/2]

template<typename T>
const_range_iterator T3DImage< T >::end_range ( const C3DBounds begin,
const C3DBounds end 
) const
inline

forwarding function to access the specified range of the underlying T3DDatafield

Definition at line 313 of file 3d/image.hh.

◆ end_range_with_boundary_flags() [1/2]

template<typename T>
range_iterator_with_boundary_flag T3DImage< T >::end_range_with_boundary_flags ( const C3DBounds begin,
const C3DBounds end 
)
inline
Returns
the end of a read/write forward iterator over a subset of the data with indicator for the boundaries.

Definition at line 324 of file 3d/image.hh.

◆ end_range_with_boundary_flags() [2/2]

template<typename T>
const_range_iterator_with_boundary_flag T3DImage< T >::end_range_with_boundary_flags ( const C3DBounds begin,
const C3DBounds end 
) const
inline
Returns
the end of a read/write forward iterator over a subset of the data with indicator for the boundaries.

Definition at line 336 of file 3d/image.hh.

References C3DImage::size().

◆ get_data_line_x()

template<typename T>
void T3DImage< T >::get_data_line_x ( int  y,
int  z,
std::vector< T > &  buffer 
) const

Get some Data along some line parallel to X axis

◆ get_data_line_y()

template<typename T>
void T3DImage< T >::get_data_line_y ( int  x,
int  z,
std::vector< T > &  buffer 
) const

Get some Data along some line parallel to Y axis

◆ get_data_line_z()

template<typename T>
void T3DImage< T >::get_data_line_z ( int  x,
int  y,
std::vector< T > &  buffer 
) const

Get some Data along some line parallel to Z axis

◆ get_data_plane_xy()

template<typename T>
T2DImage<T> T3DImage< T >::get_data_plane_xy ( size_t  z) const

forwarding function to access the underlying T3DDatafield

◆ get_data_plane_xz()

template<typename T>
T2DImage<T> T3DImage< T >::get_data_plane_xz ( size_t  y) const

forwarding function to access the underlying T3DDatafield

◆ get_data_plane_yz()

template<typename T>
T2DImage<T> T3DImage< T >::get_data_plane_yz ( size_t  x) const

forwarding function to access the underlying T3DDatafield

◆ get_gradient()

template<typename T>
C3DFVector T3DImage< T >::get_gradient ( int  index) const
inline

read/write access to the underlying data

Evaluate the gradient at a given location of the image

Todo:
evil, remove it

Definition at line 387 of file 3d/image.hh.

References C3DImage::get_minmax_intensity(), and C3DImage::get_size().

◆ get_minmax_intensity()

template<typename T>
std::pair<double, double> T3DImage< T >::get_minmax_intensity ( ) const
virtual
Returns
minimum and mximum pixel intensity of the image

Implements C3DImage.

◆ get_size()

template<typename T>
virtual const C3DBounds& T3DImage< T >::get_size ( ) const
virtual
Returns
the 3D size of the image

Implements C3DImage.

Referenced by FDeformer3D::operator()(), and FConvert3DImageToPixeltypeO< O >::operator()().

◆ operator()() [1/4]

template<typename T>
const_reference T3DImage< T >::operator() ( size_t  x,
size_t  y,
size_t  z 
) const
inline

element access operator - read only

Definition at line 268 of file 3d/image.hh.

◆ operator()() [2/4]

template<typename T>
reference T3DImage< T >::operator() ( size_t  x,
size_t  y,
size_t  z 
)
inline

element access operator - read/write

Definition at line 273 of file 3d/image.hh.

◆ operator()() [3/4]

template<typename T>
const_reference T3DImage< T >::operator() ( const C3DBounds l) const
inline

element access operator - read only

Definition at line 278 of file 3d/image.hh.

References T3DVector< T >::x, T3DVector< T >::y, and T3DVector< T >::z.

◆ operator()() [4/4]

template<typename T>
reference T3DImage< T >::operator() ( const C3DBounds l)
inline

element access operator - read/write

Definition at line 283 of file 3d/image.hh.

References T3DVector< T >::x, T3DVector< T >::y, and T3DVector< T >::z.

◆ operator=() [1/2]

template<typename T>
T3DImage& T3DImage< T >::operator= ( const T3DImage< T > &  orig)

copy operator

◆ operator=() [2/2]

template<typename T>
T3DImage& T3DImage< T >::operator= ( T3DImage< T > &&  orig)

move operator

◆ operator[]() [1/2]

template<typename T>
const_reference T3DImage< T >::operator[] ( int  i) const
inline

a linear read only access operator

Definition at line 364 of file 3d/image.hh.

◆ operator[]() [2/2]

template<typename T>
reference T3DImage< T >::operator[] ( int  i)
inline

A linear read/write access operator. The refcount of Data must be 1, else the program will abort with a failed assertion (if assert is enabled)

Definition at line 372 of file 3d/image.hh.

◆ put_data_line_x()

template<typename T>
void T3DImage< T >::put_data_line_x ( int  y,
int  z,
const std::vector< T > &  buffer 
)

Put some Data along some line parallel to X axis

◆ put_data_line_y()

template<typename T>
void T3DImage< T >::put_data_line_y ( int  x,
int  z,
const std::vector< T > &  buffer 
)

Put some Data along some line parallel to Y axis

◆ put_data_line_z()

template<typename T>
void T3DImage< T >::put_data_line_z ( int  x,
int  y,
const std::vector< T > &  buffer 
)

Put some Data along some line parallel to Z axis

◆ put_data_plane_xy()

template<typename T>
void T3DImage< T >::put_data_plane_xy ( size_t  z,
const T2DImage< T > &  p 
)

forwarding function to access the underlying T3DDatafield

◆ put_data_plane_xz()

template<typename T>
void T3DImage< T >::put_data_plane_xz ( size_t  y,
const T2DImage< T > &  p 
)

forwarding function to access the underlying T3DDatafield

◆ put_data_plane_yz()

template<typename T>
void T3DImage< T >::put_data_plane_yz ( size_t  x,
const T2DImage< T > &  p 
)

forwarding function to access the underlying T3DDatafield

◆ size()

template<typename T>
size_t T3DImage< T >::size ( ) const
virtual
Returns
the all over number of pixels/voxels

Implements C3DImage.


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