mrroi__define.pro


Name:
mrRoi
Description:
Subclass to IDLgrRoi and superclass to the four different roi
types. See the init method for details.
Constructors and destructor
mrRoi__define            : constructor 1st part
mrRoi::init              : constructor
mrRoi::cleanup           : destructor
Public variables (get/set)
mrRoi::id                : return the roi id (an integer number)
mrRoi::setId             : set the roi id (an int)
mrRoi::duplicate         : returns a copy of the present object
mrRoi::copy              : copies all properties
Public methods
mrRoi::mask              : depending on mode, return filled or framed mask
mrRoi::filledMask        : returns the roi mask in the specified
.                          dimensions with all roi points set
mrRoi::framedMask        : returns the roi mask with only border
.                          points set
Private methods
mrRoi::calcFilledMask    : calculates the filled mask and stores it
mrRoi::calcFramedMask    : calculates the framed mask and stores it

Name:
mrRoi::init
Type:
Function
Arguments:
int x           : as in IDLgrROI::init
int y           : as in IDLgrROI::init
int[2] maskSize : maskSize as in IDLanROI::computeMask
Return value:
true or false
Description:
initialize a new mrRoi object. mrRoi is a subclass to IDLgrROI
and a superclass to the four ROI objects MRroiDot, MRroiCirc, MRroiRect
and MRroiPoly. Using its 'own' class of mrRoi objects enables mrroi
to do a) some easier bookkeeping and b) implement individual
getFramedMask and getFilledMask methods.
The latter is the same for all rois, but the framed mask needed a
different implementation: while for all roi objects, the frame is
part of the roi area, for MRroiDot it must (quite naturally, otherwise
it wouldn't be a dot) be excluded.

Name:
mrRoi::cleanup
Type:
Private procedure
Description:
free the two masks and destroy label (if present)

Name:
mrRoi::id
Syntax:
id = obj->getId()
Return value:
the roi's id

Name:
mrRoi::setId
Syntax:
obj->setId, id
Arguments:
id
The roi id

Name:
mrRoi::setMaskSize
Syntax:
obj->setMaskSize, masksize
Arguments:
masksize
A two element integer array defining the size of the mask in x and y.

Name:
mrRoi::mask
Syntax:
mask = obj->mask( mode )
Arguments:
mode
If mode = 0, a mask outlining the roi will be returned, otherwise
the filled mask.

Name:
mrRoi::filledMask
Type:
Function
Return value:
returns the 2-dim 'filled' mask in the dimensions as specified
in mrRoi::init . Calculates the mask, if necessary

Name:
mrRoi::framedMask
Type:
Public function
Return value:
returns a (2-dim) framed mask in dimensions as specified in ::init.
Note that for all roi types except for MRroiDot, the frame is part
of the roi. For MRroiDot, it is not.
(MRroiDot overloads the calcFilledMask and calcFramedMask methods)

Name:
mrRoi::calcFilledMask
Type:
Public function
Description:
calculates the 2-dim filled mask (dimensions as defined during
instantiation) and saves a private pointer to it.

Name:
mrRoi::calcFramedMask
Type:
Public function
Description:
calculates the 2-dim framed mask (dimensions as defined during
instantiation) and saves a private pointer to it.

Name:
mrRoi::duplicate
Syntax:
newObj = obj->duplicate()
Description:
Creates an exact duplicate of the object

Name:
mrRoi::copy
Syntax:
obj->copy, source
Arguments:
source
An mrRoi object to copy from
Description:
Copies all properties of the source object, i.e. creates an exact
copy.

Name:
mrRoi__define
Type:
Private Procedure (constructor)

Last modified: Mon Nov 29 13:30:08 2004