#include <region.h>
Inheritance diagram for pandore::Reg3d:
A region is defined as a set of connected pixels.
All the pixels of a same region have the same value (called the label, a value in [0, +4294967295])
By convention, the region with the label=0 is considered as a non region (the background).
A Reg3d
region map is implemented as a 3D Ulong image where each pixel is a label (in a Ulong precision).
To create a region:
Public Types | |
typedef Ulong | ValueType |
Public Member Functions | |
Typobj | Type () const |
std::string | Name () const |
Ulong | Labels () const |
Ulong | Labels (Ulong n) |
PobjectProps | Props () const |
Reg3d () | |
Reg3d (Long d, Long h, Long w) | |
Reg3d (const Dimension3d &d) | |
Reg3d (const PobjectProps &p) | |
void | New (Long d, Long h, Long w) |
void | New (const Dimension3d &d) |
void | New (const PobjectProps &p, Long *data=0) |
void | Delete () |
Pobject * | Clone () const |
ValueType * | Vector () const |
Reg3d & | operator= (const Reg3d::ValueType val) |
Reg3d & | operator= (const Reg3d &rgs) |
Band2dr | operator[] (Long dep) |
const Band2dr | operator[] (Long dep) const |
ValueType & | operator() (Long z, Long y, Long x) |
const ValueType & | operator() (Long z, Long y, Long x) const |
ValueType & | operator[] (const Point3d &p) |
const ValueType & | operator[] (const Point3d &p) const |
Errc | LoadAttributes (FILE *file) |
Errc | SaveAttributes (FILE *file) const |
Errc | LoadData (FILE *file) |
Errc | SaveData (FILE *file) const |
Pobject * | Mask (const Pobject *mask) |
Pobject * | UnMask (const Pobject *mask, const Pobject *reference) |
Reg3d (const Reg3d &rgs) | |
Protected Attributes | |
Ulong | nlabels |
|
The type of the labels (for instance Ulong). Reimplemented from pandore::Img3d< Long >. |
|
Creates a new region map with no size and no data. |
|
Creates a new region map with the specified width, height and depth. Allocates therefrom the related data.
|
|
Creates a new region map with the specified dimension. Allocates therefrom the related data.
|
|
Creates a new region map with the specified properties. Allocates therefrom the related data.
|
|
Creates the region content by copy. Allocates the related data and sets the values with the rgs values. If needed casts the values by using the C casting.
|
|
Creates and returns a distinct copy of this object.
Reimplemented from pandore::Img3d< Long >. |
|
Deletes the region map data without deleting the object itself. Reimplemented from pandore::Imx3d< Long >. |
|
Sets the new higher label value.
|
|
Returns the current higher label value.
|
|
Loads attribute values from the given file. Allocates therefrom the related data.
Reimplemented from pandore::Imx3d< Long >. |
|
Loads data from the given file.
Reimplemented from pandore::Imx3d< Long >. |
|
Creates a new Reg3d where the data are masked by the given mask. It means that value are set to 0 when the related label in the mask is 0.
Reimplemented from pandore::Imx3d< Long >. |
|
Returns the name of the region type (for instance Reg3d).
Reimplemented from pandore::Img3d< Long >. |
|
Allocates the region map data from the specified properties.
|
|
Allocates the region map data from the specified dimension.
|
|
Allocates the region map data from the specified depth, height and width.
|
|
Returns the specified label at the specified coordinates. Returns the specified label at the specified coordinates.
Reimplemented from pandore::Img3d< Long >. |
|
Returns the specified label at the specified coordinates.
Reimplemented from pandore::Img3d< Long >. |
|
Sets the region map labels with the specified region map labels.
|
|
Sets the labels with the given value. This also sets the higher label value with the given value.
|
|
Returns the specified label at the specified coordinates.
Reimplemented from pandore::Img3d< Long >. |
|
Returns the specified label at the specified coordinates.
Reimplemented from pandore::Img3d< Long >. |
|
Returns the plane at the specified depth.
Reimplemented from pandore::Img3d< Long >. |
|
Returns the plane at the specified depth.
Reimplemented from pandore::Img3d< Long >. |
|
Returns the related vector of properties.
Reimplemented from pandore::Imx3d< Long >. |
|
Saves the current attribute values.
Reimplemented from pandore::Imx3d< Long >. |
|
Saves data in the given file. Allocates therefrom the related data.
Reimplemented from pandore::Imx3d< Long >. |
|
Returns the region map identifier.
Reimplemented from pandore::Img3d< Long >. |
|
Creates a new region map where the data are ummasked by the given mask and the given reference image. It means that values are set to the value of the reference object when the related label in the mask is 0.
Reimplemented from pandore::Imx3d< Long >. |
|
Returns the region data as a vector.
Reimplemented from pandore::Img3d< Long >. |
|
The maximum label value: could be different from the number of labels if some labels are unused. |