Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

mitkWidgetModel2D Class Reference

mitkWidgetModel2D - abstract class used to represent a 2D widget entity More...

#include <mitkWidgetModel2D.h>

Inherits mitkWidgetModel.

Inherited by mitkAngleWidgetModel2D, mitkEllipseWidgetModel2D, mitkLineWidgetModel2D, mitkPolygonWidgetModel2D, mitkPseudocolorWidgetModel, mitkPseudocolorWidgetModelEx, and mitkRectWidgetModel2D.

Inheritance diagram for mitkWidgetModel2D:

Inheritance graph
[legend]
Collaboration diagram for mitkWidgetModel2D:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os)
virtual void SetScene (mitkScene *scene)
virtual void SetSourceModel (mitkDataModel *model)
void SetUnits (float ux, float uy)
void SetUnits (float units[2])
void SetColor (float r, float g, float b, float a=1.0)
void SetColor (int r, int g, int b, int a=255)
virtual void Update ()
virtual mitkVolumeGetCurrentImage ()
virtual mitkVolumeGetRegionMask ()

Detailed Description

mitkWidgetModel2D - abstract class used to represent a 2D widget entity

mitkWidgetModel2D is an abstract class used to represent a 2D widget entity (e.g. a line or an angle) in a rendering scene. It can make responses to the mouse events and manipulate the mitkDataModel to which it attaches.

Note:
2D widgets are only supposed to be attached to 2D data models (e.g. mitkImageModel). Attaching them to a 3D data model could induce improper display.


Member Function Documentation

virtual mitkVolume* mitkWidgetModel2D::GetCurrentImage  )  [virtual]
 

Get the slice data which currently displayed by the source model (a mitkImageModel).

Returns:
Return a pointer of mitkVolume object contains the slice data.
Note:
The returned object pointer should be deleted properly by yourself.

virtual mitkVolume* mitkWidgetModel2D::GetRegionMask  )  [inline, virtual]
 

Get mask image where the value of widget region is 255 and the rest is 0.

Returns:
Return a pointer of mitkVolume object contains the mask image.
Note:
The returned object pointer should be deleted properly by yourself.

Reimplemented in mitkEllipseWidgetModel2D, mitkPolygonWidgetModel2D, mitkPseudocolorWidgetModel, mitkPseudocolorWidgetModelEx, and mitkRectWidgetModel2D.

virtual void mitkWidgetModel2D::PrintSelf ostream &  os  )  [virtual]
 

Print the necessary information about this object for the debugging purpose.

Parameters:
os The specified ostream to output information.

Reimplemented from mitkWidgetModel.

Reimplemented in mitkAngleWidgetModel2D, mitkEllipseWidgetModel2D, mitkLineWidgetModel2D, mitkPolygonWidgetModel2D, mitkPseudocolorWidgetModel, mitkPseudocolorWidgetModelEx, and mitkRectWidgetModel2D.

void mitkWidgetModel2D::SetColor int  r,
int  g,
int  b,
int  a = 255
 

Set the color of the widget when it is not active. The value range is from 0 to 255.

Parameters:
r red value of the color
g green value of the color
b blue value of the color
a alpha value of the color (the default value is 255)

void mitkWidgetModel2D::SetColor float  r,
float  g,
float  b,
float  a = 1.0
 

Set the color of the widget when it is not active. The value range is from 0.0 to 1.0.

Parameters:
r red value of the color
g green value of the color
b blue value of the color
a alpha value of the color (the default value is 1.0)

virtual void mitkWidgetModel2D::SetScene mitkScene scene  )  [virtual]
 

Set the scene which contains this model.

Parameters:
scene pointer to the mitkScene contains this model

Implements mitkWidgetModel.

virtual void mitkWidgetModel2D::SetSourceModel mitkDataModel model  )  [virtual]
 

Associate this widget with a model.

Parameters:
model pointer to an miekDataModel to which this widget attach

Reimplemented from mitkWidgetModel.

Reimplemented in mitkPseudocolorWidgetModelEx.

void mitkWidgetModel2D::SetUnits float  units[2]  )  [inline]
 

Set unit length on axes.

Parameters:
units[0] unit length in x-axis
units[1] unit length in y-axis

void mitkWidgetModel2D::SetUnits float  ux,
float  uy
[inline]
 

Set unit length on axes.

Parameters:
ux unit length in x-axis
uy unit length in y-axis

virtual void mitkWidgetModel2D::Update  )  [virtual]
 

Update the parameters of the widget.

Implements mitkWidgetModel.

Reimplemented in mitkPseudocolorWidgetModelEx.


The documentation for this class was generated from the following file:
Generated on Tue Feb 25 15:07:45 2014 for MITK (Medical Imaging ToolKit) by  doxygen 1.4.3