i3d::LabeledImage3d< LABEL, VOXEL > Class Template Reference
#include <regions.h>
Inheritance diagram for i3d::LabeledImage3d< LABEL, VOXEL >:

Public Member Functions | |
| LabeledImage3d (const Offset *off_=0, const Resolution *res_=0) | |
| void | CreateRegions (Image3d< VOXEL > &, const Neighbourhood &nb=nb3D_6) |
| void | CreateRegionsFF (Image3d< VOXEL > &, const Neighbourhood &nb=nb3D_6) |
| void | CreateForegroundRegionsFF (const Image3d< VOXEL > &, const Neighbourhood &nb=nb3D_6) |
| template<class Predicate> | |
| void | MergeComponents (LABEL comp, Predicate pred) |
| void | MergeComponents (LABEL comp1, LABEL comp2) |
| template<class T> | |
| bool | Convert (Image3d< T > &img) |
| size_t | NumberOfComponents () |
| Vector3d< int > | GetDisplacement () const |
| get the image displacement | |
| void | SetDisplacement (const Vector3d< int > &d) |
| set the image displacement | |
Public Attributes | |
| ComponentInfo< VOXEL >::Container | components |
Detailed Description
template<class LABEL, class VOXEL>
class i3d::LabeledImage3d< LABEL, VOXEL >
class LabeledImage3d implements a labeled image
Constructor & Destructor Documentation
| i3d::LabeledImage3d< LABEL, VOXEL >::LabeledImage3d | ( | const Offset * | off_ = 0, |
|
| const Resolution * | res_ = 0 | |||
| ) | [inline, explicit] |
Empty image:
Member Function Documentation
| void i3d::LabeledImage3d< LABEL, VOXEL >::CreateRegions | ( | Image3d< VOXEL > & | , | |
| const Neighbourhood & | nb = nb3D_6 | |||
| ) |
CreateRegions performs region labeling algorithm on an input Image3d<VOXEL> image. Size of *this LabeledImage3d will be same as of the input image. Information about regions is stored into this->components container. Neigbourhood nb is expected to be symetric. If it is not, the algorithm create symetric neigbourhood from offsets (x, y, z) of nb where (x <= 0 && y == 0 && z == 0) || (y < 0 && z == 0) || (y <= 0 && z < 0)
| void i3d::LabeledImage3d< LABEL, VOXEL >::CreateRegionsFF | ( | Image3d< VOXEL > & | , | |
| const Neighbourhood & | nb = nb3D_6 | |||
| ) |
The results are same as for CreateRegions function. Different algorithm (based on FloodFill) is used. Neighbourhood nb3D_6 is imlicitly assumed
| void i3d::LabeledImage3d< LABEL, VOXEL >::CreateForegroundRegionsFF | ( | const Image3d< VOXEL > & | , | |
| const Neighbourhood & | nb = nb3D_6 | |||
| ) |
If we know the background needn't be labeled we can speed up the labeling process.
| void i3d::LabeledImage3d< LABEL, VOXEL >::MergeComponents | ( | LABEL | comp, | |
| Predicate | pred | |||
| ) | [inline] |
Component comp is merged with all components for which pred holds.
| void i3d::LabeledImage3d< LABEL, VOXEL >::MergeComponents | ( | LABEL | comp1, | |
| LABEL | comp2 | |||
| ) |
components comp1 and comp2 are merged
| bool i3d::LabeledImage3d< LABEL, VOXEL >::Convert | ( | Image3d< T > & | img | ) | [inline] |
function converts LabeledImage3d to Image3d if it is possible (i.e number of components < max value of Image3d type) List of components is lost. Returned value indicate whether conversion was successful.
| size_t i3d::LabeledImage3d< LABEL, VOXEL >::NumberOfComponents | ( | ) | [inline] |
return number of components
Member Data Documentation
| ComponentInfo<VOXEL>::Container i3d::LabeledImage3d< LABEL, VOXEL >::components |
container of ComponentInfo structures:
The documentation for this class was generated from the following files:
- regions.h
- regions.cc
