nsIDaimImageMap Interface Reference

Compute various topological elements from a region description. More...

import "nsIDaimImageMap.idl";

Inherits nsIDaimNotify.

List of all members.

Public Member Functions

void build (in nsIDaimParameters params, in PRUint32 connect, in PRInt32 flags)
void createRegion (in nsIDaimParameters params, in PRInt32 label, in PRBool include_holes)
void clear (in PRInt32 label)
void getRegionProperties (in nsIDaimPropertyList props, in PRUint32 key, in nsIDaimStorageMap storage, in nsIDaimParameters params)
*PRInt32 getLabelFromPoint (in PRInt32 x, in PRInt32 y)
void removeLabels ([array, size_is(count)] in PRInt32 labels, in PRUint32 count)
void selectLabels (in nsIDaimParameters params,[array, size_is(count)] in PRInt32 labels, in PRUint32 count)
void removeLabelArray (in string column, in nsIDaimStorageMap storage)
void selectLabelArray (in nsIDaimParameters params, in string column, in nsIDaimStorageMap storage)
void setCalibration (in double uppx, in double ar)
void fillHoles ()
void cleanBorders ()
void cleanRegionBorders (in nsIDaimParameters params)
void reconstruct (in nsIDaimParameters params)

Public Attributes

readonly attribute PRUint32 count
readonly attribute PRUint32 depth

Detailed Description

Compute various topological elements from a region description.


The ImageMap interface will compute topological attributs from a partition in connexe components of a given region. The partition is organized so has to take advantage of the hierarchical structure of objects and holes in the computation of the objects properties. Each connexe components is designated by a label used as an object réference in ImageMap methods.

Note that the label 0 always correspond to background.

Implemented by:

Member Function Documentation

void nsIDaimImageMap::build in nsIDaimParameters  params,
in PRUint32  connect,
in PRInt32  flags


Build a partition from the mask obtained from the params object

params parameter object
connect the connectivity ( 4 or 8 )
flags flags can be a combination of the following values:
  • CCIV_ImageMap_NoClip (0x01L) The region will not be clipped with the input image rectangle (if any). Instead the bounding rectangle will be set to the bounding rectangle of the input region.
  • CCIV_ImageMap_OffsetRoi (0x02L) Used in conjunction with CCIV_ImageMap_NoClip, the input region will be offset so as to have the bounding rectangle top left corner at the origin (0,0).

void nsIDaimImageMap::cleanBorders  ) 


void nsIDaimImageMap::cleanRegionBorders in nsIDaimParameters  params  ) 


Remove all objects outside or adjacent to the border of the given roi

void nsIDaimImageMap::clear in PRInt32  label  ) 


Remove object corresponding to label

Warning that label is likely to be affected to the parent object

void nsIDaimImageMap::createRegion in nsIDaimParameters  params,
in PRInt32  label,
in PRBool  include_holes


Create the mask corresponding to the object designated by label

The mask will be stored in the params object (using dmIparameteres::SetMask).

  • If label==-1 the mask will correspond to the background region (i.e the region adjacent to borders).
  • If label== 0 the mask will correspond to the reunion of all objects.
  • If label== x the mask will correspond to object designated by label.

void nsIDaimImageMap::fillHoles  ) 


* PRInt32 nsIDaimImageMap::getLabelFromPoint in PRInt32  x,
in PRInt32  y


Return the label of the object located at (x,y)

void nsIDaimImageMap::getRegionProperties in nsIDaimPropertyList  props,
in PRUint32  key,
in nsIDaimStorageMap  storage,
in nsIDaimParameters  params


Compute object properties

storage an instance of a dmIStorageMap object. Storage will be obtained with dmIStorageMap::GetCol().
props The list of property/name pairs, where name is the name of the storage map column.
key The associated key
params parameters used for getting the current image
The following properties can be computed
  • CCIA_RgnDesc_Labels return labels
  • CCIA_RgnDesc_Border return full border length
  • CCIA_RgnDesc_Boundary return external border length
  • CCIA_RgnDesc_Area return size
  • CCIA_RgnDesc_Dir return direction
  • CCIA_RgnDesc_Euler return euler number
  • CCIA_RgnDesc_CX return X-Centroid
  • CCIA_RgnDesc_CY return Y-Centroid
  • CCIA_RgnDesc_L1 return min axis length
  • CCIA_RgnDesc_L2 return max axis length
  • CCIA_RgnDesc_Moment?xn=p&yn=q return central moment of order p,q

If params is supplied then the following properties can be computed:

  • CCIA_ImgDesc_TotalDensity?n=p return total (sum) density value of order p
  • CCIA_ImgDesc_MeanDensity return mean density value
  • CCIA_ImgDesc_MinDensity return min luminance value
  • CCIA_ImgDesc_MaxDensity return max luminance value
  • CCIA_ImgDesc_MeanDensity return mean luminance value

void nsIDaimImageMap::reconstruct in nsIDaimParameters  params  ) 


Perform a reconstruction using the mask given in params

The Reconstruction is done by constructing a new mask from objects that intersect the mask given in params.

The new computed mask is stored as the new default mask in params

void nsIDaimImageMap::removeLabelArray in string  column,
in nsIDaimStorageMap  storage


Clear objects from labels stored at column column of the storage map

void nsIDaimImageMap::removeLabels [array, size_is(count)] in PRInt32  labels,
in PRUint32  count


Clear all labels in labels

void nsIDaimImageMap::selectLabelArray in nsIDaimParameters  params,
in string  column,
in nsIDaimStorageMap  storage


Create the mask from objects whose labels are stored at column column of the storage map

void nsIDaimImageMap::selectLabels in nsIDaimParameters  params,
[array, size_is(count)] in PRInt32  labels,
in PRUint32  count


Create the mask corresponding to all the objects in labels

void nsIDaimImageMap::setCalibration in double  uppx,
in double  ar


uppx Units per pixel
ar Aspect ration

Member Data Documentation

readonly attribute PRUint32 nsIDaimImageMap::count


readonly attribute PRUint32 nsIDaimImageMap::depth


Generated on Tue May 23 17:31:48 2006 for Daim Library XPCOM Interfaces by  doxygen 1.4.6-NO