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

mitkClippingPlaneWidgetModel Class Reference

mitkClippingPlaneWidgetModel - a 3D widget for clipping plane More...

#include <mitkClippingPlaneWidgetModel.h>

Inherits mitkWidgetModel3D.

Inheritance diagram for mitkClippingPlaneWidgetModel:

Inheritance graph
[legend]
Collaboration diagram for mitkClippingPlaneWidgetModel:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual void PrintSelf (ostream &os)
 mitkClippingPlaneWidgetModel (float ox, float oy, float oz, float nx=0.0f, float ny=0.0f, float nz=1.0f, float width=100.0f, float height=100.0f)
 mitkClippingPlaneWidgetModel (coord_type v0x, coord_type v0y, coord_type v0z, coord_type v1x, coord_type v1y, coord_type v1z, coord_type cx, coord_type cy, coord_type cz)
void SetPlanePosition (coord_type v0x, coord_type v0y, coord_type v0z, coord_type v1x, coord_type v1y, coord_type v1z, coord_type cx, coord_type cy, coord_type cz)
virtual int Render (mitkScene *scene)
virtual void Pick (const WidgetNames &names)
virtual void Release ()
virtual void SetSourceModel (mitkDataModel *model)
void SetOpacity (float opacity)
virtual void Update ()
void RotateRadAroundXAxisOfPlane (float angle)
void RotateRadAroundYAxisOfPlane (float angle)
void RotateRadAroundZAxisOfPlane (float angle)
void RotateDegAroundXAxisOfPlane (float angle)
void RotateDegAroundYAxisOfPlane (float angle)
void RotateDegAroundZAxisOfPlane (float angle)
void TranslatePlane (float tx, float ty, float tz)
void SetPlaneCenter (float ox, float oy, float oz)

Protected Member Functions

virtual void _onMouseDown (int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos)
virtual void _onMouseUp (int mouseButton, bool ctrlDown, bool shiftDown, int xPos, int yPos)
virtual void _onMouseMove (bool ctrlDown, bool shiftDown, int xPos, int yPos, int deltaX, int deltaY)

Detailed Description

mitkClippingPlaneWidgetModel - a 3D widget for clipping plane

mitkClippingPlaneWidgetModel is a 3D widget for clipping plane. It provides an appearance and an interaction way for clipping plane. It is supposed to be attached to a 3D data model (e.g. mitkVolumeModel, mitkSurfaceModel), and in other conditions the display could be improper.


Constructor & Destructor Documentation

mitkClippingPlaneWidgetModel::mitkClippingPlaneWidgetModel float  ox,
float  oy,
float  oz,
float  nx = 0.0f,
float  ny = 0.0f,
float  nz = 1.0f,
float  width = 100.0f,
float  height = 100.0f
 

A constructor of mitkClippingPlaneWidgetModel. The default normal of this plane is (0.0, 0.0, 1.0) (XoY plane) and the default size of this plane is 100.0*100.0.

Parameters:
ox x-coordinate of the clipping plane's center point
oy y-coordinate of the clipping plane's center point
oz z-coordinate of the clipping plane's center point
nx x-coordinate of the clipping plane's normal, the default value is 0.0
ny y-coordinate of the clipping plane's normal, the default value is 0.0
nz z-coordinate of the clipping plane's normal, the default value is 1.0
width width of the plane shown in the scene, the default value is 100.0
height height of the plane shown in the scene, the default value is 100.0

mitkClippingPlaneWidgetModel::mitkClippingPlaneWidgetModel coord_type  v0x,
coord_type  v0y,
coord_type  v0z,
coord_type  v1x,
coord_type  v1y,
coord_type  v1z,
coord_type  cx,
coord_type  cy,
coord_type  cz
 

A constructor. The parameters specify a rectangle in the model space via its left-bottom point, right-bottom point and center point.

Parameters:
v0x the x-coordinate of the left-bottom point
v0y the y-coordinate of the left-bottom point
v0z the z-coordinate of the left-bottom point
v1x the x-coordinate of the right-bottom point
v1y the y-coordinate of the right-bottom point
v1z the z-coordinate of the right-bottom point
cx the x-coordinate of the center point
cy the y-coordinate of the center point
cz the z-coordinate of the center point


Member Function Documentation

virtual void mitkClippingPlaneWidgetModel::_onMouseDown int  mouseButton,
bool  ctrlDown,
bool  shiftDown,
int  xPos,
int  yPos
[protected, virtual]
 

Deal with mouse down event.

Parameters:
mouseButton indicates which mouse button is pressed
ctrlDown indicates if the key "Ctrl" is pressed
shiftDown indicates if the key "Shift" is pressed
xPos x-coordinate of the mouse position when mouse down event occurs
yPos y-coordinate of the mouse position when mouse down event occurs

Implements mitkWidgetModel.

virtual void mitkClippingPlaneWidgetModel::_onMouseMove bool  ctrlDown,
bool  shiftDown,
int  xPos,
int  yPos,
int  deltaX,
int  deltaY
[protected, virtual]
 

Deal with mouse move event.

Parameters:
ctrlDown indicates if the key "Ctrl" is pressed
shiftDown indicates if the key "Shift" is pressed
xPos x-coordinate of the mouse position when mouse move event occurs
yPos y-coordinate of the mouse position when mouse move event occurs
deltaX movement along x-axis of the mouse when mouse move event occurs
deltaY movement along y-axis of the mouse when mouse move event occurs

Implements mitkWidgetModel.

virtual void mitkClippingPlaneWidgetModel::_onMouseUp int  mouseButton,
bool  ctrlDown,
bool  shiftDown,
int  xPos,
int  yPos
[protected, virtual]
 

Deal with mouse up event.

Parameters:
mouseButton indicates which mouse button was pressed and now released
ctrlDown indicates if the key "Ctrl" is pressed
shiftDown indicates if the key "Shift" is pressed
xPos x-coordinate of the mouse position when mouse up event occurs
yPos y-coordinate of the mouse position when mouse up event occurs

Implements mitkWidgetModel.

virtual void mitkClippingPlaneWidgetModel::Pick const WidgetNames &  names  )  [virtual]
 

Maintain the selection status when this widget is picked.

Parameters:
names a constant reference to an WidgerNames which contains the names of selected parts of this widget.

Implements mitkWidgetModel.

virtual void mitkClippingPlaneWidgetModel::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 mitkWidgetModel3D.

virtual void mitkClippingPlaneWidgetModel::Release  )  [virtual]
 

Maintain the selection status when this widget is released.

Implements mitkWidgetModel.

virtual int mitkClippingPlaneWidgetModel::Render mitkScene scene  )  [virtual]
 

Render this model.

Parameters:
scene the pointer of an mitkScene in which this model will be shown
Returns:
Return 1 if this model is rendered successfully. Otherwise return 0.

Reimplemented from mitkModel.

void mitkClippingPlaneWidgetModel::RotateDegAroundXAxisOfPlane float  angle  ) 
 

Rotate the plane around the x axis of the plane. This function is provided for convenience. It behaves essentially like RotateRadAroundXAxisOfPlane(), but the parameter angle is in degree.

Parameters:
angle rotation angle in degree

void mitkClippingPlaneWidgetModel::RotateDegAroundYAxisOfPlane float  angle  ) 
 

Rotate the plane around the y axis of the plane. This function is provided for convenience. It behaves essentially like RotateRadAroundYAxisOfPlane(), but the parameter angle is in degree.

Parameters:
angle rotation angle in degree

void mitkClippingPlaneWidgetModel::RotateDegAroundZAxisOfPlane float  angle  ) 
 

Rotate the plane around the z axis of the plane. This function is provided for convenience. It behaves essentially like RotateRadAroundZAxisOfPlane(), but the parameter angle is in degree.

Parameters:
angle rotation angle in degree

void mitkClippingPlaneWidgetModel::RotateRadAroundXAxisOfPlane float  angle  ) 
 

Rotate the plane around the x axis of the plane.

	                         |z   / y
	           left top      |   /       right top
	               o---------|--+-----------o
	              /          | /           /
	             /           |/           /  x
	            /            o-----------+---->
	           /                        /
	          /                        /
	         o------------------------o
	     left bottom             right bottom
	   
	    
Note:
The rotation is performed in the local coordinates of the plane.
Parameters:
angle rotation angle in radian

void mitkClippingPlaneWidgetModel::RotateRadAroundYAxisOfPlane float  angle  ) 
 

Rotate the plane around the y axis of the plane.

	                         |z   / y
	           left top      |   /       right top
	               o---------|--+-----------o
	              /          | /           /
	             /           |/           /  x
	            /            o-----------+---->
	           /                        /
	          /                        /
	         o------------------------o
	     left bottom             right bottom
	   
	    
Note:
The rotation is performed in the local coordinates of the plane.
Parameters:
angle rotation angle in radian

void mitkClippingPlaneWidgetModel::RotateRadAroundZAxisOfPlane float  angle  ) 
 

Rotate the plane around the z axis of the plane.

	                         |z   / y
	           left top      |   /       right top
	               o---------|--+-----------o
	              /          | /           /
	             /           |/           /  x
	            /            o-----------+---->
	           /                        /
	          /                        /
	         o------------------------o
	     left bottom             right bottom
	   
	    
Note:
The rotation is performed in the local coordinates of the plane.
Parameters:
angle rotation angle in radian

void mitkClippingPlaneWidgetModel::SetOpacity float  opacity  ) 
 

Set the opacity of the plane.

Parameters:
opacity the opacity of the plane (the value is between 0.0f and 1.0f)

void mitkClippingPlaneWidgetModel::SetPlaneCenter float  ox,
float  oy,
float  oz
 

Set the center of the plane.

Parameters:
ox the x coordinate of the center
oy the y coordinate of the center
oz the z coordinate of the center

void mitkClippingPlaneWidgetModel::SetPlanePosition coord_type  v0x,
coord_type  v0y,
coord_type  v0z,
coord_type  v1x,
coord_type  v1y,
coord_type  v1z,
coord_type  cx,
coord_type  cy,
coord_type  cz
 

Set the position of this plane. The parameters specify a rectangle in the model space via its left-bottom point, right-bottom point and center point.

Parameters:
v0x the x-coordinate of the left-bottom point
v0y the y-coordinate of the left-bottom point
v0z the z-coordinate of the left-bottom point
v1x the x-coordinate of the right-bottom point
v1y the y-coordinate of the right-bottom point
v1z the z-coordinate of the right-bottom point
cx the x-coordinate of the center point
cy the y-coordinate of the center point
cz the z-coordinate of the center point

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

Associate this widget with a data model.

Parameters:
model pointer to an mitkDataModel with which this widget is associated
Note:
The parameter model can be NULL. It indicates that manipulation on this widget does not have an effect on other data models.

Reimplemented from mitkWidgetModel3D.

void mitkClippingPlaneWidgetModel::TranslatePlane float  tx,
float  ty,
float  tz
 

Translate the plane with translation vector (tx, ty, tz).

Parameters:
tx the x coordinate of the translation vector
ty the y coordinate of the translation vector
tz the z coordinate of the translation vector

virtual void mitkClippingPlaneWidgetModel::Update  )  [virtual]
 

Update the parameters of the widget.

Reimplemented from mitkWidgetModel3D.


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