mrdataflash__define.pro


Name:
mrdataflash
Methods:
Constructor
mrdataflash::init                : constructor

General
mrdataflash::display             : display data
mrdataflash::hide                : switch off data display
mrdataflash::show                : same as mrdataflash::display

Get and set
mrdataflash::setDicomSource      : set the mrdicom data source object
mrdataflash::setCharsize         : set character size

Event handling
mrdataflash::selfregister        : register with a display object
mrdataflash::unregister          : unregister with the display
mrdisplayEvtHandler>mrdataflash::mrdisplayEvtHandler : event handler for the mrdisplay
mrdataflash::buttonPressEvt      : toggles data display

Private
mrdataflash__define              : constructor, part I
mrdataflash::cleanup             : destructor
Description:
A plugin object for mrdisplay and mrmultidisplay which overlays
patient data to the image.
The first call to display will be in many cases a bit slow as
the underlying mrdicom object needs to fill its internal table
of tagvalues (which can take up to 1-2 seconds on a PIII 700!)

Example code:
display = obj_new('mrdisplay')
; now set some image, etc
flash   = obj_new('mrdataflash')
flash->selfregister, display
flash->setDicomSource, some_mrdicom_object
flash->display                     ; display data, will call display->display
; then .... do whatever
flash->hide                        ; eventually hide date again
One may also link a mouse button to displaying/hiding the data, a la:
flash->selfregister, display, button=2
Pressing the mouse button will then show/hide the dicom tag values

Name:
mrdataflash::init
Syntax:
obj = obj_new('mrDataflash', fontsize=float, color=intarr(3))
Arguments:
fontsize
font size, default is 11 point
color
RGB font color, default is [0,255,0] (green)
Return value:
0 or 1 (i.e. null pointer or object pointer)
Description:
Instanciates the object

Name:
mrdataflash::cleanup
Description:
remove data (hide) from display, then unregister

Name:
mrdataflash::setDicomSource
Syntax:
obj->setDicomSource, sourceobj
Arguments:
sourceobj
A object reference to an mrdicom object to use as data source
Description:
Informs the mrdataflash from which mrdicom object to read the data
If data is displayed, calling this function will automatically
redisplay

Name:
mrdataflash::setFontsize
Syntax:
obj->setFontsize, fontsize
Arguments:
fontsize
The font size in pixels.
Description:
If mrdataflash values are visible, changing the character size
will automatically redisplay. Setting the font size too large in
a small window will make the text overlap.

Name:
mrdataflash::setColor
Syntax:
obj->setColor, color
Arguments:
color
3-element integer array holding the RGB colors to use.
Setting the color will automatically redisplay
Description:
Sets the color. If color is not a 3-element vector, the method returns
without further ado.

Name:
mrdataflash::display
Syntax:
obj->display
Description:
Display the data - each call to mrdataflash::display will re-read
the data from the mrdicom object!
(Local storage and re-read upon request puts more load on the user
without any real benefit as getting the data from the mrdicom
object is not expensive - so we re-read. Otoh that means, that the
mrdicom object must not be destroyed in the meantime....

Name:
mrdataflash::hide
Syntax:
obj->hide
Description:
Removes dicom data from display. Causes redisplay.

Name:
mrdataflash::show
Syntax:
obj->show
Description:
Displays dicom data. Same as mrdataflash::display

Name:
mrdataflash::selfregister
Syntax:
obj->selfregister, display, button=int
Arguments:
display
The mrdisplay object with which to register
button
Integer denoting the mouse button which toggles display. Left = 1,
middle=2, right=3. By default, no (=0) mouse button is associated
with the object.
Description:
Register with the display

Name:
mrdataflash::unregister
Syntax:
obj->unregister
Description:
Unregisters with a mrdisplay object

Name:
mrdataflash::mrdisplayEvtHandler
Syntax:
obj->mrdisplayEvtHandler
Arguments:
evt
Pointer to the event structure from mrdisplay
Description:
Dispatch the event coming from mrdisplay

Name:
mrdataflash::buttonPressEvt
Syntax:
obj->buttonPressEvt, evt
Arguments:
evt
Pointer to the event structure from mrdisplay
Description:
Toggle display of dicom data via calls to mrdataflash::display
and mrdataflash::hide

Name:
mrdataflash__define
Description:
The constructor

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