#include <HxSegmentation2d.h>
Public Methods | |
| HxSegmentation2d () | |
| Constructor. More... | |
| HxSegmentation2d (HxImageRep inputIm, HxImageRep labIm) | |
| Constructor. More... | |
| ~HxSegmentation2d () | |
| Destructor. More... | |
| int | ident () const |
| The identifier of this segmentation. More... | |
| void | setInputImage (HxImageRep inputIm) |
| Set the orginal image. More... | |
| HxImageRep | getInputImage () const |
| Get the orginal image. More... | |
| void | setLabeledImage (HxImageRep labIm) |
| Set the labeled image. More... | |
| HxImageRep | getLabeledImage () const |
| Get the labeled image. More... | |
| void | addBlob (HxBlob2d *blob) |
| Add a blob to the segmentation. More... | |
| void | addBlob (int label, int xmin, int ymin, int width, int height) |
| Add a blob to the segmentation. More... | |
| HxBlob2dListConstIter | getBlobBegin () const |
| Get begin of the blob list. More... | |
| HxBlob2dListConstIter | getBlobEnd () const |
| Get end (STL term) of the blob list. More... | |
| HxBlob2dListBackInserter | getBlobInserter () |
| Get a backinserter for the blob list. More... | |
| void | addRelation (HxString name, HxBlob2dRelation *rel) |
| Add a relation to the segmentation. More... | |
| HxBlob2dRelation * | getRelation (HxString name) const |
| Get a relation from the segmentation. More... | |
| STD_OSTREAM & | put (STD_OSTREAM &os) const |
| Put segmentation on stream. More... | |
Basically, a list of HxBlob2d's, possibly with relationships.
|
|
Constructor.
00017 {
00018 _ident = _nr++;
00019 }
|
|
||||||||||||
|
Constructor.
00022 {
00023 _inputImage = inputIm;
00024 _labImage = labIm;
00025 _ident = _nr++;
00026 }
|
|
|
Destructor.
00029 {
00030 for(int i=0 ; i<_blobs.size() ; i++)
00031 delete _blobs[i];
00032 _blobs.clear();
00033 }
|
|
|
The identifier of this segmentation.
00037 {
00038 return _ident;
00039 }
|
|
|
Set the orginal image.
00043 {
00044 _inputImage = inputIm;
00045 }
|
|
|
Get the orginal image.
00049 {
00050 return _inputImage;
00051 }
|
|
|
Set the labeled image.
00055 {
00056 _labImage = labIm;
00057 }
|
|
|
Get the labeled image.
00061 {
00062 return _labImage;
00063 }
|
|
|
Add a blob to the segmentation. Will take ownership of the blob.
00067 {
00068 _blobs.push_back(blob);
00069 }
|
|
||||||||||||||||||||||||
|
Add a blob to the segmentation.
|
|
|
Get begin of the blob list.
00080 {
00081 return _blobs.begin();
00082 }
|
|
|
Get end (STL term) of the blob list.
00086 {
00087 return _blobs.end();
00088 }
|
|
|
Get a backinserter for the blob list.
00092 {
00093 return std::back_inserter(_blobs);
00094 }
|
|
||||||||||||
|
Add a relation to the segmentation. Will take ownership of the relation.
00098 {
00099 _relations[name] = rel;
00100 }
|
|
|
Get a relation from the segmentation.
00104 {
00105 return (*_relations.find(name)).second;
00106 }
|
|
|
Put segmentation on stream.
00110 {
00111 os << "Segmentation " << _ident << ", nr of blobs : " << _blobs.size()
00112 << STD_ENDL;
00113 for (int i=0 ; i<_blobs.size() ; i++)
00114 os << (*_blobs[i]);
00115 return os;
00116 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001