#include <Image3D.hpp>

Public Member Functions | |
| Image3D () | |
| Constructor to build a 0 size image 3D. | |
| Image3D (const size_t width, const size_t height, const size_t depth, const size_t nbChannel, T *buffer=0) | |
| Constructor to build an allocated empty image 3D or an image 3D from a raw data buffer. | |
| Image3D (const Image3D< T > &i) | |
| Copy Constructor. | |
| virtual | ~Image3D () |
| dealoccates image 3D data | |
| virtual T * | begin () const |
| getting the raw data of the image | |
| virtual T * | end () const |
| getting the end of raw data of the image | |
| virtual size_t | width () const |
| getting the width of the image | |
| virtual size_t | height () const |
| getting the height of the image | |
| virtual size_t | depth () const |
| getting the depth of the image | |
| virtual size_t | nbChannel () const |
| getting the nb of channel of the image | |
| virtual size_t | size () const |
| getting the total size of the image | |
| virtual T * | operator() (const unsigned int x, const unsigned int y, const unsigned int z) const |
| get pointer on the asked pixel | |
| virtual T * | at (const unsigned int x, const unsigned int y, const unsigned int z) const |
| get pointer on the asked pixel (with bounds checking). | |
| virtual T & | operator() (const unsigned int x, const unsigned int y, const unsigned int z, const unsigned int channel) |
| get component value of the asked pixel | |
| virtual T & | at (const unsigned int x, const unsigned int y, const unsigned int z, const unsigned int channel) |
| get component value of the asked pixel (with bounds checking). | |
| virtual const T & | operator() (const unsigned int x, const unsigned int y, const unsigned int z, const unsigned int channel) const |
| get component value of the asked pixel | |
| virtual const T & | at (const unsigned int x, const unsigned int y, const unsigned int z, const unsigned int channel) const |
| get component value of the asked pixel (with bounds checking) This function behaves the same than the operator() but checks if indices are valid respect to the size of | |
| virtual Image3D< T > & | operator= (const Image3D &i) |
| copy on this image the content of another if they have the same resolution and nb channel; if the calling image have width = height = depth = 0, this function create the adequat memory, else throws an exception. | |
| void | fill (const T &value) |
| fill all the voxels component to the parameter value | |
| void | setFrame (unsigned int index, Image< T > &frame) |
| fill all the voxels of a given frame with the values of a given image | |
| void | getFrame (unsigned int index, Image< T > &frame) |
| fill an image with the values of a given frame | |
Protected Member Functions | |
| void | initRowsAndFrames () |
| allocate and initialize the rows array | |
Protected Attributes | |
| T * | data |
| raw data of the image 3D | |
| T ** | frames |
| pointers on each frame of the image 3D on the raw date | |
| T *** | rows |
| pointers on each row of the image 3D on the raw date | |
| T * | begin_ |
| pointer on the begining of raw data | |
| T * | end_ |
| pointer on the end of raw data | |
| size_t | imageWidth |
| width of the image | |
| size_t | imageHeight |
| height of the image | |
| size_t | imageDepth |
| depth of the image | |
| size_t | imageNbChannel |
| nb of channel of the image | |
| size_t | imageSize |
| Total size of the image (w*h*d). | |
The data of the image 3D is represented as a unidimensionnal array of the basic typename. Moreover, we store the position of any row and any frame allowing a fast acces to any voxel of the image. The first row is the top row and each row is stored from left to right.
Definition at line 63 of file Image3D.hpp.
| kn::Image3D< T >::Image3D | ( | ) | [inline] |
| kn::Image3D< T >::Image3D | ( | const size_t | width, | |
| const size_t | height, | |||
| const size_t | depth, | |||
| const size_t | nbChannel, | |||
| T * | buffer = 0 | |||
| ) | [inline] |
Constructor to build an allocated empty image 3D or an image 3D from a raw data buffer.
| width | width of the image 3D | |
| height | height of the image 3D | |
| depth | depth of the image 3D | |
| nbChannel | nb of channel of the image 3D | |
| buffer | optional data buffer WHICH IS NOT COPYIED |
Definition at line 352 of file Image3D.hpp.
| kn::Image3D< T >::Image3D | ( | const Image3D< T > & | i | ) | [inline] |
| kn::Image3D< T >::~Image3D | ( | ) | [inline, virtual] |
| virtual const T& kn::Image3D< T >::at | ( | const unsigned int | x, | |
| const unsigned int | y, | |||
| const unsigned int | z, | |||
| const unsigned int | channel | |||
| ) | const [inline, virtual] |
get component value of the asked pixel (with bounds checking) This function behaves the same than the operator() but checks if indices are valid respect to the size of
| x | width position of the pixel | |
| y | height position of the pixel | |
| z | depth position of the pixel | |
| channel | component number |
Definition at line 245 of file Image3D.hpp.
| virtual T& kn::Image3D< T >::at | ( | const unsigned int | x, | |
| const unsigned int | y, | |||
| const unsigned int | z, | |||
| const unsigned int | channel | |||
| ) | [inline, virtual] |
get component value of the asked pixel (with bounds checking).
| x | width position of the pixel | |
| y | height position of the pixel | |
| z | depth position of the pixel | |
| channel | component number |
Definition at line 217 of file Image3D.hpp.
| virtual T* kn::Image3D< T >::at | ( | const unsigned int | x, | |
| const unsigned int | y, | |||
| const unsigned int | z | |||
| ) | const [inline, virtual] |
get pointer on the asked pixel (with bounds checking).
This function is the same than the operator() but checks if indices are valid.
| x | width position of the pixel | |
| y | height position of the pixel |
Definition at line 191 of file Image3D.hpp.
| virtual T* kn::Image3D< T >::begin | ( | ) | const [inline, virtual] |
getting the raw data of the image
Definition at line 123 of file Image3D.hpp.
| virtual size_t kn::Image3D< T >::depth | ( | ) | const [inline, virtual] |
getting the depth of the image
Definition at line 164 of file Image3D.hpp.
| virtual T* kn::Image3D< T >::end | ( | ) | const [inline, virtual] |
getting the end of raw data of the image
Definition at line 128 of file Image3D.hpp.
| void kn::Image3D< T >::fill | ( | const T & | value | ) | [inline] |
fill all the voxels component to the parameter value
| value | : value used to fill the image |
Definition at line 262 of file Image3D.hpp.
| void kn::Image3D< T >::getFrame | ( | unsigned int | index, | |
| Image< T > & | frame | |||
| ) | [inline] |
fill an image with the values of a given frame
| index | : index of the frame | |
| frame | : image which will be filled |
| ImageException | : invalid frame dimensions | |
| ImageException | : index out of bound |
Definition at line 286 of file Image3D.hpp.
| virtual size_t kn::Image3D< T >::height | ( | ) | const [inline, virtual] |
getting the height of the image
Definition at line 159 of file Image3D.hpp.
| void kn::Image3D< T >::initRowsAndFrames | ( | ) | [inline, protected] |
| virtual size_t kn::Image3D< T >::nbChannel | ( | ) | const [inline, virtual] |
getting the nb of channel of the image
Definition at line 169 of file Image3D.hpp.
| virtual const T& kn::Image3D< T >::operator() | ( | const unsigned int | x, | |
| const unsigned int | y, | |||
| const unsigned int | z, | |||
| const unsigned int | channel | |||
| ) | const [inline, virtual] |
get component value of the asked pixel
| x | width position of the pixel | |
| y | height position of the pixel | |
| z | depth position of the pixel | |
| channel | component number |
Definition at line 232 of file Image3D.hpp.
| virtual T& kn::Image3D< T >::operator() | ( | const unsigned int | x, | |
| const unsigned int | y, | |||
| const unsigned int | z, | |||
| const unsigned int | channel | |||
| ) | [inline, virtual] |
get component value of the asked pixel
| x | width position of the pixel | |
| y | height position of the pixel | |
| z | depth position of the pixel | |
| channel | component number |
Definition at line 206 of file Image3D.hpp.
| virtual T* kn::Image3D< T >::operator() | ( | const unsigned int | x, | |
| const unsigned int | y, | |||
| const unsigned int | z | |||
| ) | const [inline, virtual] |
get pointer on the asked pixel
| x | width position of the pixel | |
| y | height position of the pixel |
Definition at line 181 of file Image3D.hpp.
| Image3D< T > & kn::Image3D< T >::operator= | ( | const Image3D< T > & | i | ) | [inline, virtual] |
copy on this image the content of another if they have the same resolution and nb channel; if the calling image have width = height = depth = 0, this function create the adequat memory, else throws an exception.
| i | : source image |
| ImageException | : incompatible image size |
Definition at line 500 of file Image3D.hpp.
| void kn::Image3D< T >::setFrame | ( | unsigned int | index, | |
| Image< T > & | frame | |||
| ) | [inline] |
fill all the voxels of a given frame with the values of a given image
| index | : index of the frame | |
| frame | : image which will be used for filling |
| ImageException | : invalid frame dimensions | |
| ImageException | : index out of bound |
Definition at line 272 of file Image3D.hpp.
| virtual size_t kn::Image3D< T >::size | ( | ) | const [inline, virtual] |
getting the total size of the image
Definition at line 174 of file Image3D.hpp.
| virtual size_t kn::Image3D< T >::width | ( | ) | const [inline, virtual] |
getting the width of the image
Definition at line 154 of file Image3D.hpp.
T* kn::Image3D< T >::begin_ [protected] |
T* kn::Image3D< T >::data [protected] |
T* kn::Image3D< T >::end_ [protected] |
T** kn::Image3D< T >::frames [protected] |
size_t kn::Image3D< T >::imageDepth [protected] |
size_t kn::Image3D< T >::imageHeight [protected] |
size_t kn::Image3D< T >::imageNbChannel [protected] |
size_t kn::Image3D< T >::imageSize [protected] |
size_t kn::Image3D< T >::imageWidth [protected] |
T*** kn::Image3D< T >::rows [protected] |
1.5.8