#include <region.h>
Inheritance diagram for pandore::Reg2d:
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 Reg2d
region map is implemented as a 2D 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 |
Reg2d () | |
Reg2d (Long h, Long w) | |
Reg2d (const Dimension2d &d) | |
Reg2d (const PobjectProps &p) | |
void | New (Long h, Long w) |
void | New (const Dimension2d &d) |
void | New (const PobjectProps &p, Ulong *data=0) |
void | Delete () |
Pobject * | Clone () const |
ValueType * | Vector () const |
Band1dr | operator[] (Long row) |
const Band1dr | operator[] (Long row) const |
ValueType & | operator() (Long y, Long x) |
const ValueType & | operator() (Long y, Long x) const |
ValueType & | operator[] (const Point2d &p) |
const ValueType & | operator[] (const Point2d &p) const |
Reg2d & | operator= (const Reg2d::ValueType val) |
Reg2d & | operator= (const Reg2d &rgs) |
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) |
Reg2d (const Reg2d &rgs) | |
Public Attributes | |
Ulong | nlabels |
Classes | |
class | Band1dr |
The 1D image data. More... |
|
The type of the labels (for instance Ulong). Reimplemented from pandore::Img2d< Long >. |
|
Creates a new region map with no size and no data. |
|
Creates a new region map with the specified width and height. 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::Img2d< Long >. |
|
Deletes the region map data without deleting the object itself. Reimplemented from pandore::Imx3d< Long >. |
|
Sets the new higher label value.
|
|
Returns the higher label value.
|
|
Loads attribute values from the given file. Allocates therefrom the related data.
Reimplemented from pandore::Imx2d< Long >. |
|
Loads data from the given file.
Reimplemented from pandore::Imx3d< Long >. |
|
Creates a new Pobject of the same type but 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::Imx2d< Long >. |
|
Returns the name of the region type (for instance Reg2d).
Reimplemented from pandore::Img2d< 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 height and width.
|
|
Returns the specified label at the specified coordinates.
Reimplemented from pandore::Img2d< Long >. |
|
Returns the specified label at the specified coordinates.
Reimplemented from pandore::Img2d< 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::Img2d< Long >. |
|
Returns the specified label at the specified coordinates.
Reimplemented from pandore::Img2d< Long >. |
|
Returns the line at the specified row.
Reimplemented from pandore::Img2d< Long >. |
|
Returns the line at the specified row.
Reimplemented from pandore::Img2d< Long >. |
|
Returns the related vector of properties.
Reimplemented from pandore::Imx3d< Long >. |
|
Saves the current attribute values.
Reimplemented from pandore::Imx2d< 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::Img2d< 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::Imx2d< Long >. |
|
Returns the region data as a vector.
Reimplemented from pandore::Img2d< Long >. |
|
The maximum label value: could be different from the number of labels if some labels are unused. |