T3DImage< T > Class Template Reference
Basic data strctures and functions

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
Public Types inherited from C3DImage
typedef C3DBounds | dimsize_type
| generic type for the dimension of the image
typedef std::shared_ptr< C3DImage > | Pointer
| Pointer type of the image.

## Public Member Functions

iterator | begin ()
| read/write iterator, issues copy-on-write
const_iterator | begin () const
| constant iterator
iterator | begin_at (size_t x, size_t y, size_t z)
| read/write iterator starting at the given location
const_iterator | begin_at (size_t x, size_t y, size_t z) const
| constant iterator starting at the given location
range_iterator | begin_range (const C3DBounds &begin, const C3DBounds &end)
| forwarding function to access the specified range of the underlying T3DDatafield
const_range_iterator | begin_range (const C3DBounds &begin, const C3DBounds &end) const
| forwarding function to access the specified range of the underlying T3DDatafield
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
iterator | end ()
| read/write iterator, issues copy-on-write
const_iterator | end () const
| constant iterator
range_iterator | end_range (const C3DBounds &begin, const C3DBounds &end)
| forwarding function to access the specified range of the underlying T3DDatafield
const_range_iterator | end_range (const C3DBounds &begin, const C3DBounds &end) const
| forwarding function to access the specified range of the underlying T3DDatafield
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
T2DImage< T > | get_data_plane_xz (size_t y) const
| forwarding function to access the underlying T3DDatafield
T2DImage< T > | get_data_plane_yz (size_t x) const
| forwarding function to access the underlying T3DDatafield
C3DFVector | get_gradient (int index) const
| read/write access to the underlying data
std::pair< double, double > | get_minmax_intensity () const
virtual const C3DBounds & | get_size () const
reference | operator() (const C3DBounds &l)
| element access operator - read/write
const_reference | operator() (const C3DBounds &l) const
| element access operator - read only
reference | operator() (size_t x, size_t y, size_t z)
| element access operator - read/write
const_reference | operator() (size_t x, size_t y, size_t z) const
| element access operator - read only
T3DImage & | operator= (const T3DImage< T > &orig)
T3DImage & | operator= (T3DImage< T > &&orig)
reference | operator[] (int i)
const_reference | operator[] (int i) const
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
void | put_data_plane_xz (size_t y, const T2DImage< T > &p)
| forwarding function to access the underlying T3DDatafield
void | put_data_plane_yz (size_t x, const T2DImage< T > &p)
| forwarding function to access the underlying T3DDatafield
size_t | size () const
| T3DImage ()
| T3DImage (const C3DBounds &size)
| T3DImage (const C3DBounds &size, const CAttributedData &attr)
| T3DImage (const C3DBounds &size, const data_array &init_data)
| T3DImage (const C3DBounds &size, const T *init_data)
| T3DImage (const T3DDatafield< T > &orig)
| T3DImage (const T3DImage< T > &orig)
| T3DImage (T3DImage< T > &&orig)
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)
void | set_rotation (const C3DRotation &voxel)
| set the rotation about the origin of the image
void | set_voxel_size (const C3DFVector &voxel)
| set the voxel size on world units
virtual | ~C3DImage ()
| CAttributedData ()
| CAttributedData (const CAttributedData &org)
| CAttributedData (PAttributeMap attr)
CAttributedData & | operator= (const CAttributedData &org)
| Assignemt operator.
const PAttribute | get_attribute (const std::string &key) const
CAttributeMap::const_iterator | begin_attributes () const
CAttributeMap::const_iterator | end_attributes () const
void | set_attribute (const std::string &key, PAttribute attr)
void | set_attributes (CAttributeMap::const_iterator begin, CAttributeMap::const_iterator end)
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)
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
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
void | delete_attribute (const std::string &key)
bool | has_attribute (const std::string &key) const
void | print (std::ostream &os) const

## Additional Inherited Members

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

## 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 149 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 153 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_data | input 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

  orig | the 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>

iterator T3DImage< T >::begin | ( |  | ) |

inline

read/write iterator, issues copy-on-write

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

## begin() [2/2]

template<typename T>

const_iterator T3DImage< T >::begin | ( |  | ) | const

inline

constant iterator

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

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

## begin_at() [1/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 378 of file 3d/image.hh.

## begin_at() [2/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 372 of file 3d/image.hh.

Referenced by FDeformer3D::operator()().

## 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 306 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 318 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 331 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 345 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>

iterator T3DImage< T >::end | ( |  | ) |

inline

read/write iterator, issues copy-on-write

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

## end() [2/2]

template<typename T>

const_iterator T3DImage< T >::end | ( |  | ) | const

inline

constant iterator

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

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

## 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 312 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 324 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 337 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 351 of file 3d/image.hh.

## 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 407 of file 3d/image.hh.

## 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 FConvert3DImageToPixeltypeO< float >::operator()(), and FDeformer3D::operator()().

## operator()() [1/4]

template<typename T>

reference T3DImage< T >::operator() | ( | const C3DBounds & | l | ) |

inline

element access operator - read/write

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

## operator()() [2/4]

template<typename T>

const_reference T3DImage< T >::operator() | ( | const C3DBounds & | l | ) | const

inline

element access operator - read only

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

## operator()() [3/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 276 of file 3d/image.hh.

## operator()() [4/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 270 of file 3d/image.hh.

## 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>

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 392 of file 3d/image.hh.

## operator[]() [2/2]

template<typename T>

const_reference T3DImage< T >::operator[] | ( | int | i | ) | const

inline

a linear read only access operator

Definition at line 384 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:

- 3d/image.hh