A templated class of a 3D data field. More...
#include <mia/3d/datafield.hh>
Data Structures | |
| class | ConstRange |
| class | Range |
| a shortcut data type More... | |
Public Member Functions | |
| const_iterator | begin () const |
| iterator | begin () |
| const_iterator | begin_at (size_t x, size_t y, size_t z) const |
| iterator | begin_at (size_t x, size_t y, size_t z) |
| range_iterator | begin_range (const C3DBounds &begin, const C3DBounds &end) |
| const_range_iterator | begin_range (const C3DBounds &begin, const C3DBounds &end) const |
| 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 |
| void | clear () |
| const_iterator | end () const |
| iterator | end () |
| range_iterator | end_range (const C3DBounds &begin, const C3DBounds &end) |
| const_range_iterator | end_range (const C3DBounds &begin, const C3DBounds &end) const |
| 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 |
| value_type | get_avg () |
| value_type | get_block_avrg (const C3DBounds &Start, const C3DBounds &BlockSize) 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 |
| T2DDatafield< T > | get_data_plane_xy (size_t z) const |
| T2DDatafield< T > | get_data_plane_xz (size_t y) const |
| T2DDatafield< T > | get_data_plane_yz (size_t x) const |
| template<typename Out > | |
| T3DVector< Out > | get_gradient (const T3DVector< float > &p) const |
| template<typename Out > | |
| T3DVector< Out > | get_gradient (size_t x, size_t y, size_t z) const |
| template<typename Out > | |
| T3DVector< Out > | get_gradient (int index) const |
| template<> | |
| T3DVector< Out > | get_gradient (int hardcode) const |
| value_type | get_interpol_val_at (const T3DVector< float > &p) const __attribute__((deprecated)) |
| size_t | get_plane_size_xy () const |
| Range | get_range (const C3DBounds &start, const C3DBounds &end) |
| ConstRange | get_range (const C3DBounds &start, const C3DBounds &end) const |
| const C3DBounds & | get_size () const |
| bool | holds_unique_data () const __attribute__((deprecated)) |
| void | make_single_ref () __attribute__((deprecated)) |
| template<class TMask > | |
| void | mask (const TMask &m) |
| const_reference | operator() (size_t x, size_t y, size_t z) const |
| const_reference | operator() (const C3DBounds &l) const |
| reference | operator() (size_t x, size_t y, size_t z) |
| reference | operator() (const C3DBounds &l) |
| T3DDatafield & | operator= (const T3DDatafield &org) |
| T3DDatafield & | operator= (T3DDatafield &&org) |
| Moave asignment. More... | |
| 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 T2DDatafield< T > &p) |
| void | put_data_plane_xz (size_t y, const T2DDatafield< T > &p) |
| void | put_data_plane_yz (size_t x, const T2DDatafield< T > &p) |
| void | read_xslice_flat (size_t x, std::vector< atomic_type > &buffer) const |
| void | read_yslice_flat (size_t y, std::vector< atomic_type > &buffer) const |
| void | read_zslice_flat (size_t z, std::vector< atomic_type > &buffer) const |
| size_type | size () const |
| value_type | strip_avg () |
| void | swap (T3DDatafield &other) |
| swap the data ofthis 3DDatafield with another one More... | |
| T3DDatafield () | |
| T3DDatafield (const C3DBounds &_Size) | |
| T3DDatafield (const C3DBounds &size, const T *data) | |
| T3DDatafield (const C3DBounds &size, const data_array &data) | |
| T3DDatafield (const T3DDatafield< T > &org) | |
| T3DDatafield (T3DDatafield< T > &&org) | |
| void | write_xslice_flat (size_t x, const std::vector< atomic_type > &buffer) |
| void | write_yslice_flat (size_t y, const std::vector< atomic_type > &buffer) |
| void | write_zslice_flat (size_t z, const std::vector< atomic_type > &buffer) |
| virtual | ~T3DDatafield () |
| make sure the destructor is virtual More... | |
A templated class of a 3D data field.
Definition at line 82 of file 3d/datafield.hh.
| T3DDatafield< T >::T3DDatafield | ( | ) |
|
explicit |
Constructor to create empty Datafield if given size
| T3DDatafield< T >::T3DDatafield | ( | const C3DBounds & | size, |
| const T * | data | ||
| ) |
Constructor to create Datafield if given size and with initialization data
| size | the size of the 3D-field |
| data | to use for initialization |
| T3DDatafield< T >::T3DDatafield | ( | const C3DBounds & | size, |
| const data_array & | data | ||
| ) |
Constructor to create Datafield if given size and with initialization data
| size | the size of the 3D-field |
| data | to use for initialization |
| T3DDatafield< T >::T3DDatafield | ( | const T3DDatafield< T > & | org | ) |
copy - Constructor
| T3DDatafield< T >::T3DDatafield | ( | T3DDatafield< T > && | org | ) |
move constructor
|
virtual |
make sure the destructor is virtual
|
inline |
Definition at line 416 of file 3d/datafield.hh.
Referenced by T3DDatafield< C3DFVector >::begin().
|
inline |
Definition at line 441 of file 3d/datafield.hh.
|
inline |
Definition at line 424 of file 3d/datafield.hh.
Referenced by FDeformer3D::operator()().
|
inline |
Obtain an iterator at position (x,y,z) The functions ensures, that the field uses a single referenced datafield
| x | |
| y | |
| z |
Definition at line 488 of file 3d/datafield.hh.
| range_iterator T3DDatafield< T >::begin_range | ( | const C3DBounds & | begin, |
| const C3DBounds & | end | ||
| ) |
Referenced by T3DDatafield< C3DFVector >::begin().
| const_range_iterator T3DDatafield< T >::begin_range | ( | const C3DBounds & | begin, |
| const C3DBounds & | end | ||
| ) | const |
| range_iterator_with_boundary_flag T3DDatafield< T >::begin_range_with_boundary_flags | ( | const C3DBounds & | begin, |
| const C3DBounds & | end | ||
| ) |
Referenced by T3DDatafield< C3DFVector >::begin().
| const_range_iterator_with_boundary_flag T3DDatafield< T >::begin_range_with_boundary_flags | ( | const C3DBounds & | begin, |
| const C3DBounds & | end | ||
| ) | const |
| void T3DDatafield< T >::clear | ( | ) |
Set alle elements of the field to T() == Zero
Referenced by T3DDatafield< C3DFVector >::get_size().
|
inline |
Definition at line 433 of file 3d/datafield.hh.
Referenced by T3DDatafield< C3DFVector >::begin().
|
inline |
Definition at line 496 of file 3d/datafield.hh.
| range_iterator T3DDatafield< T >::end_range | ( | const C3DBounds & | begin, |
| const C3DBounds & | end | ||
| ) |
Referenced by T3DDatafield< C3DFVector >::begin().
| const_range_iterator T3DDatafield< T >::end_range | ( | const C3DBounds & | begin, |
| const C3DBounds & | end | ||
| ) | const |
| range_iterator_with_boundary_flag T3DDatafield< T >::end_range_with_boundary_flags | ( | const C3DBounds & | begin, |
| const C3DBounds & | end | ||
| ) |
Referenced by T3DDatafield< C3DFVector >::begin().
| const_range_iterator_with_boundary_flag T3DDatafield< T >::end_range_with_boundary_flags | ( | const C3DBounds & | begin, |
| const C3DBounds & | end | ||
| ) | const |
| value_type T3DDatafield< T >::get_avg | ( | ) |
Referenced by T3DDatafield< C3DFVector >::size().
| value_type T3DDatafield< T >::get_block_avrg | ( | const C3DBounds & | Start, |
| const C3DBounds & | BlockSize | ||
| ) | const |
Get the average over a given Block Attn: Type T must be able to hold the Sum of all Elements in Block
| void T3DDatafield< T >::get_data_line_x | ( | int | y, |
| int | z, | ||
| std::vector< T > & | buffer | ||
| ) | const |
Get some Data along some line parallel to X axis
Referenced by T3DDatafield< C3DFVector >::operator()().
| void T3DDatafield< T >::get_data_line_y | ( | int | x, |
| int | z, | ||
| std::vector< T > & | buffer | ||
| ) | const |
Get some Data along some line parallel to Y axis
Referenced by T3DDatafield< C3DFVector >::operator()().
| void T3DDatafield< T >::get_data_line_z | ( | int | x, |
| int | y, | ||
| std::vector< T > & | buffer | ||
| ) | const |
Get some Data along some line parallel to Z axis
Referenced by T3DDatafield< C3DFVector >::operator()().
| T2DDatafield<T> T3DDatafield< T >::get_data_plane_xy | ( | size_t | z | ) | const |
Read a z-plane from the 3D data set.
| z |
Referenced by T3DDatafield< C3DFVector >::operator()().
| T2DDatafield<T> T3DDatafield< T >::get_data_plane_xz | ( | size_t | y | ) | const |
Read a y-plane from the 3D data set.
| y |
Referenced by T3DDatafield< C3DFVector >::operator()().
| T2DDatafield<T> T3DDatafield< T >::get_data_plane_yz | ( | size_t | x | ) | const |
Read a x-plane from the 3D data set.
| x |
Referenced by T3DDatafield< C3DFVector >::operator()().
| T3DVector< Out > T3DDatafield< T >::get_gradient | ( | const T3DVector< float > & | p | ) | const |
Gradient calculation using tri-linear interpolation
| p | position where to evaluate the gradient |
Definition at line 637 of file 3d/datafield.hh.
| T3DVector< Out > T3DDatafield< T >::get_gradient | ( | size_t | x, |
| size_t | y, | ||
| size_t | z | ||
| ) | const |
calculate gradient of data field at a grid point
Definition at line 589 of file 3d/datafield.hh.
| T3DVector< Out > T3DDatafield< T >::get_gradient | ( | int | index | ) | const |
calculate the gradient at a grid point given by a linear location
Definition at line 609 of file 3d/datafield.hh.
| T3DVector< Out > T3DDatafield< bool >::get_gradient | ( | int | hardcode | ) | const |
Specialization to handle the wired std::vector<bool> implementation
Definition at line 626 of file 3d/datafield.hh.
| value_type T3DDatafield< T >::get_interpol_val_at | ( | const T3DVector< float > & | p | ) | const |
Interpolate the value of Field at p default uses tri-linear interpolation
Referenced by T3DVectorfield< C3DFVector >::set_voxel_size().
|
inline |
Definition at line 517 of file 3d/datafield.hh.
| Range T3DDatafield< T >::get_range | ( | const C3DBounds & | start, |
| const C3DBounds & | end | ||
| ) |
Referenced by T3DDatafield< C3DFVector >::begin().
| ConstRange T3DDatafield< T >::get_range | ( | const C3DBounds & | start, |
| const C3DBounds & | end | ||
| ) | const |
|
inline |
Definition at line 231 of file 3d/datafield.hh.
Referenced by FDeformer3D::operator()().
|
inline |
Checks whether the data hold by the data field is unique.
Definition at line 97 of file 3d/datafield.hh.
| void T3DDatafield< T >::make_single_ref | ( | ) |
makes a single reference of the data, after calling this, it is save to write to the data field
Mask the data field with a given mask
Referenced by T3DDatafield< C3DFVector >::operator()().
|
inline |
read-only indx operator
Definition at line 256 of file 3d/datafield.hh.
|
inline |
alternate read-only indx operator
Definition at line 267 of file 3d/datafield.hh.
|
inline |
Index operator witch gives write access
Definition at line 273 of file 3d/datafield.hh.
|
inline |
Alternate index operator witch gives write access
Definition at line 284 of file 3d/datafield.hh.
| T3DDatafield& T3DDatafield< T >::operator= | ( | const T3DDatafield< T > & | org | ) |
Assignment operator -
| T3DDatafield& T3DDatafield< T >::operator= | ( | T3DDatafield< T > && | org | ) |
Moave asignment.
|
inline |
a linear read only access operator
Definition at line 502 of file 3d/datafield.hh.
|
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 510 of file 3d/datafield.hh.
| void T3DDatafield< T >::put_data_line_x | ( | int | y, |
| int | z, | ||
| const std::vector< T > & | buffer | ||
| ) |
Put some Data along some line parallel to X axis
Referenced by T3DDatafield< C3DFVector >::operator()().
| void T3DDatafield< T >::put_data_line_y | ( | int | x, |
| int | z, | ||
| const std::vector< T > & | buffer | ||
| ) |
Put some Data along some line parallel to Y axis
Referenced by T3DDatafield< C3DFVector >::operator()().
| void T3DDatafield< T >::put_data_line_z | ( | int | x, |
| int | y, | ||
| const std::vector< T > & | buffer | ||
| ) |
Put some Data along some line parallel to Z axis
Referenced by T3DDatafield< C3DFVector >::operator()().
| void T3DDatafield< T >::put_data_plane_xy | ( | size_t | z, |
| const T2DDatafield< T > & | p | ||
| ) |
write a z-plane to the 3D data set.
| z | |
| p | plane data, must be of dimensions (size.x, size.y) |
Referenced by T3DDatafield< C3DFVector >::operator()().
| void T3DDatafield< T >::put_data_plane_xz | ( | size_t | y, |
| const T2DDatafield< T > & | p | ||
| ) |
write a y-plane to the 3D data set.
| y | |
| p | plane data, must be of dimensions (size.x, size.z) |
Referenced by T3DDatafield< C3DFVector >::operator()().
| void T3DDatafield< T >::put_data_plane_yz | ( | size_t | x, |
| const T2DDatafield< T > & | p | ||
| ) |
write a x-plane to the 3D data set.
| x | |
| p | plane data, must be of dimensions (size.y, size.z) |
Referenced by T3DDatafield< C3DFVector >::operator()().
| void T3DDatafield< T >::read_xslice_flat | ( | size_t | x, |
| std::vector< atomic_type > & | buffer | ||
| ) | const |
Read the a x-slice of the data field into a flat buffer - i.e. the information about multi-dimensionality of the elements is lost. For this to work, T has to be a POD-like data type, i.e., it has no hidden elements like a virtual methods table, and, if T is a type of more then one element, all these elements have to be of the same type. Specifically, a specialization of the trait atomic_data for T must exists.
| x | slice to be read | |
| [out] | buffer | Buffer where the data will be written to. It must large enough to hold size.y * size.z * number of elements |
Referenced by T3DDatafield< C3DFVector >::operator()().
| void T3DDatafield< T >::read_yslice_flat | ( | size_t | y, |
| std::vector< atomic_type > & | buffer | ||
| ) | const |
Read the a y-slice of the data field into a flat buffer - i.e. the information about multi-dimensionality of the elements is lost. For this to work, T has to be a POD-like data type, i.e., it has no hidden elements like a virtual methods table, and, if T is a type of more then one element, all these elements have to be of the same type. Specifically, a specialization of the trait atomic_data for T must exists.
| y | slice to be read | |
| [out] | buffer | Buffer where the data will be written to. It must large enough to hold size.x * size.z * number of elements |
Referenced by T3DDatafield< C3DFVector >::operator()().
| void T3DDatafield< T >::read_zslice_flat | ( | size_t | z, |
| std::vector< atomic_type > & | buffer | ||
| ) | const |
Read the a z-slice of the data field into a flat buffer - i.e. the information about multi-dimensionality of the elements is lost. For this to work, T has to be a POD-like data type, i.e., it has no hidden elements like a virtual methods table, and, if T is a type of more then one element, all these elements have to be of the same type. Specifically, a specialization of the trait atomic_data for T must exists.
| z | slice to be read | |
| [out] | buffer | Buffer where the data will be written to. It must large enough to hold size.x * size.y * number of elements |
Referenced by T3DDatafield< C3DFVector >::operator()().
|
inline |
Definition at line 240 of file 3d/datafield.hh.
| value_type T3DDatafield< T >::strip_avg | ( | ) |
Strip average from data
Referenced by T3DDatafield< C3DFVector >::size().
| void T3DDatafield< T >::swap | ( | T3DDatafield< T > & | other | ) |
swap the data ofthis 3DDatafield with another one
Referenced by T3DDatafield< C3DFVector >::size().
| void T3DDatafield< T >::write_xslice_flat | ( | size_t | x, |
| const std::vector< atomic_type > & | buffer | ||
| ) |
Write a x-slice from a flat buffer to the 3D data field. For details see void read_yslice_flat(size_t x, std::vector<atomic_type>& buffer) const;
Referenced by T3DDatafield< C3DFVector >::operator()().
| void T3DDatafield< T >::write_yslice_flat | ( | size_t | y, |
| const std::vector< atomic_type > & | buffer | ||
| ) |
Write a y-slice from a flat buffer to the 3D data field. For details see void read_yslice_flat(size_t y, std::vector<atomic_type>& buffer) const;
Referenced by T3DDatafield< C3DFVector >::operator()().
| void T3DDatafield< T >::write_zslice_flat | ( | size_t | z, |
| const std::vector< atomic_type > & | buffer | ||
| ) |
Write a z-slice from a flat buffer to the 3D data field. For details see void read_zslice_flat(size_t z, std::vector<atomic_type>& buffer) const;
Referenced by T3DDatafield< C3DFVector >::operator()().