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

mitkModel Class Reference

mitkModel - abstract class used to represent an entity in a rendering scene More...

#include <mitkModel.h>

Inherits mitkObject.

Inherited by mitkDataModel, and mitkWidgetModel.

Inheritance diagram for mitkModel:

Inheritance graph
[legend]
Collaboration diagram for mitkModel:

Collaboration graph
[legend]
List of all members.

Public Types

enum  RenderMode { Rough, Medium, Refined }

Public Member Functions

virtual void PrintSelf (ostream &os)
void VisibilityOn (void)
void VisibilityOff (void)
void SetVisibility (int isVisible)
int GetVisibility (void) const
virtual int Render (mitkScene *scene)
virtual void Select (mitkScene *scene)
void SetOrigin (float x, float y, float z)
void SetOrigin (float origin[3])
float const * GetOrigin (void) const
void GetOrigin (float origin[3]) const
void SetTranslation (float x, float y, float z)
void SetTranslation (float trans[3])
float const * GetTranslation (void) const
void GetTranslation (float trans[3]) const
void SetRotation (float x, float y, float z)
void SetRotation (float rot[3])
void SetRotation (const mitkQuaternion &q)
void SetRotation (float ax, float ay, float az, float angle)
mitkQuaternion const * GetRotation (void) const
void GetRotation (float rot[3]) const
void GetRotation (float &ax, float &ay, float &az, float &angle) const
void SetScale (float sx, float sy, float sz)
void SetScale (float scale[3])
void SetScale (float scale)
float const * GetScale (void) const
void GetScale (float scale[3]) const
void GetModelMatrix (mitkMatrix *m)
void GetModelMatrix (float m[16])
mitkMatrix const * GetModelMatrix ()
void GetInverseOfModelMatrix (mitkMatrix *m)
void GetInverseOfModelMatrix (float m[16])
mitkMatrix const * GetInverseOfModelMatrix ()
float const * GetBounds ()
void GetBounds (float bounds[6])
void GetBounds (float &xMin, float &xMax, float &yMin, float &yMax, float &zMin, float &zMax)
float const * GetCenter ()
void GetCenter (float c[3])
float GetLength ()
void Reset ()
void ModelToWorld (float const modelPoint[4], float worldPoint[4])
void WorldToModel (float const worldPoint[4], float modelPoint[4])
virtual bool IsOpaque ()=0
bool GetDataModifyStatus () const
void SetDataModifyStatus (bool isModify)
void SetRenderMode (RenderMode mode)
void SetRenderModeToRough ()
void SetRenderModeToMedium ()
void SetRenderModeToRefined ()
RenderMode GetRenderMode () const

Detailed Description

mitkModel - abstract class used to represent an entity in a rendering scene

mitkModel is an abstract class used to represent an entity in a rendering scene.


Member Enumeration Documentation

enum mitkModel::RenderMode
 

The enumeration for render mode.

Enumerator:
Rough  render model in rough mode to achieve a faster rendering process
Medium  render model in medium mode to get a medium result at a medium rendering speed
Refined  render model in refined mode, but result in a slower rendering speed


Member Function Documentation

void mitkModel::GetBounds float &  xMin,
float &  xMax,
float &  yMin,
float &  yMax,
float &  zMin,
float &  zMax
 

Get the bounds for this Prop3D as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).

Parameters:
xMin minimum value in x-axis
xMax maximum value in x-axis
yMin minimum value in y-axis
yMax maximum value in y-axis
zMin minimum value in z-axis
zMax maximum value in z-axis
Note:
This function will call the virtual function GetBounds() to get the proper bounds according to the actual type of object.

void mitkModel::GetBounds float  bounds[6]  ) 
 

Get the bounds for this Prop3D as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).

Parameters:
bounds[6] a float array returns the Xmin, Xmax, Ymin, Ymax, Zmin and Zmax in turn.
Note:
This function will call the virtual function GetBounds() to get the proper bounds according to the actual type of object.

float const* mitkModel::GetBounds  ) 
 

Get the bounds for this Prop3D as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).

Returns:
Return a float array which contains Xmin, Xmax, Ymin, Ymax, Zmin and Zmax in turn.
Note:
This is a pure virtual function. It must be implemented in subclasses.

void mitkModel::GetCenter float  c[3]  ) 
 

Get the center of the bounding box in world coordinates.

Parameters:
c[3] return a float array which contains Cx, Cy, Cz in turn

float const* mitkModel::GetCenter  ) 
 

Get the center of the bounding box in world coordinates.

Returns:
Return a float array which contains Cx, Cy, Cz in turn.

bool mitkModel::GetDataModifyStatus  )  const [inline]
 

Get the status of source data.

Returns:
Return true if the source data is modified. Otherwise return false.

mitkMatrix const* mitkModel::GetInverseOfModelMatrix  ) 
 

Get the inverse of model matrix.

Returns:
Return a pointer to a mitkMatrix contains the inverse of model matrix.

void mitkModel::GetInverseOfModelMatrix float  m[16]  ) 
 

Get the inverse of model matrix.

Parameters:
m[16] a float array returns the inverse of model matrix
Warning:
The matrix elements in the array are arranged as follows:
	    m[0]   m[4]   m[8]   m[12]
	    m[1]   m[5]   m[9]   m[13]
	    m[2]   m[6]   m[10]  m[14]
	    m[3]   m[7]   m[11]  m[15]
	    

void mitkModel::GetInverseOfModelMatrix mitkMatrix m  ) 
 

Get the inverse of model matrix.

Parameters:
m pointer to a mitkMatrix returns the inverse of model matrix

float mitkModel::GetLength  ) 
 

Get the length of the diagonal of the bounding box.

Returns:
the length of the diagonal of the bounding box

mitkMatrix const* mitkModel::GetModelMatrix  ) 
 

Return a reference to the model's 4x4 composite matrix. Get the matrix from the position, origin, scale and orientation this matrix is cached, so multiple GetMatrix() calls will be efficient.

Returns:
Return a pointer to a mitkMatrix contains the model matrix.

void mitkModel::GetModelMatrix float  m[16]  ) 
 

Return a reference to the model's 4x4 composite matrix. Get the matrix from the position, origin, scale and orientation this matrix is cached, so multiple GetMatrix() calls will be efficient.

Parameters:
m[16] a float array returns the model's 4x4 composite matrix
Warning:
The matrix elements in the array are arranged as follows:
	    m[0]   m[4]   m[8]   m[12]
	    m[1]   m[5]   m[9]   m[13]
	    m[2]   m[6]   m[10]  m[14]
	    m[3]   m[7]   m[11]  m[15]
	    

void mitkModel::GetModelMatrix mitkMatrix m  ) 
 

Return a reference to the model's 4x4 composite matrix. Get the matrix from the position, origin, scale and orientation this matrix is cached, so multiple GetMatrix() calls will be efficient.

Parameters:
m pointer to a mitkMatrix returns the model's 4x4 composite matrix

void mitkModel::GetOrigin float  origin[3]  )  const [inline]
 

Get the origin of the model. This is the point about which all rotations take place.

Parameters:
origin[0] return x-coordinate of the origin
origin[1] return y-coordinate of the origin
origin[2] return z-coordinate of the origin

float const* mitkModel::GetOrigin void   )  const [inline]
 

Get the origin of the model. This is the point about which all rotations take place.

Returns:
Return a float array contains x, y and z coordinate in turn.

RenderMode mitkModel::GetRenderMode  )  const [inline]
 

Get the render mode of this model.

See also:
RenderMode

void mitkModel::GetRotation float &  ax,
float &  ay,
float &  az,
float &  angle
const [inline]
 

Get the rotation of the model.

Parameters:
ax return x-coordinate of rotation axis
ay return y-coordinate of rotation axis
az return z-coordinate of rotation axis
angle return the angle of rotation in degrees

void mitkModel::GetRotation float  rot[3]  )  const [inline]
 

Get the rotation of the model. (obsolete, just provided for convenience.)

Parameters:
rot[0] return rotation around x-axis in degrees
rot[1] return rotation around y-axis in degrees
rot[2] return rotation around z-axis in degrees

mitkQuaternion const* mitkModel::GetRotation void   )  const [inline]
 

Get the rotation of the model.

Returns:
Return a float array contains rotations around x, y and z axes.

void mitkModel::GetScale float  scale[3]  )  const [inline]
 

Get the scale of the model.

Parameters:
scale[0] return scale in x-axis
scale[1] return scale in y-axis
scale[2] return scale in z-axis

float const* mitkModel::GetScale void   )  const [inline]
 

Get the scales of the model.

Returns:
Return a float array contains scales in x, y and z axes.

void mitkModel::GetTranslation float  trans[3]  )  const [inline]
 

Get the translation of the model.

Parameters:
trans[0] return translation in x-axis
trans[1] return translation in y-axis
trans[2] return translation in z-axis

float const* mitkModel::GetTranslation void   )  const [inline]
 

Get the translation of the model.

Returns:
Return a float array contains translations in x, y and z axes.

int mitkModel::GetVisibility void   )  const [inline]
 

Get the visibility of this model.

Returns:
Return 1 if the model is visible. Otherwise return 0.

virtual bool mitkModel::IsOpaque  )  [pure virtual]
 

Whether this model is opaque.

Returns:
Return true if this model is opaque.
Note:
This is a pure virtual function. It must be implemented in subclasses.

Implemented in mitkImageModel, mitkOrthogonalImageModel, mitkSurfaceModel, mitkVolumeModel, and mitkWidgetModel.

void mitkModel::ModelToWorld float const   modelPoint[4],
float  worldPoint[4]
[inline]
 

Transform a point from object(model) coordinate to world coordinate.

Parameters:
modelPoint[4] a float array contains coordinates of the model point
worldPoint[4] a float array to return coordinates of the world point corresponding to the model point

virtual void mitkModel::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 mitkObject.

Reimplemented in mitkAngleWidgetModel2D, mitkAngleWidgetModel3D, mitkClippingPlaneWidgetModel, mitkDataModel, mitkEllipseWidgetModel2D, mitkImageModel, mitkLineWidgetModel2D, mitkLineWidgetModel3D, mitkOrthogonalImageModel, mitkPolygonWidgetModel2D, mitkPseudocolorWidgetModel, mitkPseudocolorWidgetModelEx, mitkRectWidgetModel2D, mitkReslicePlaneWidgetModel, mitkSurfaceModel, mitkVolumeModel, mitkWidgetModel, mitkWidgetModel2D, and mitkWidgetModel3D.

virtual int mitkModel::Render mitkScene scene  )  [inline, 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 in mitkAngleWidgetModel2D, mitkAngleWidgetModel3D, mitkClippingPlaneWidgetModel, mitkEllipseWidgetModel2D, mitkImageModel, mitkLineWidgetModel2D, mitkLineWidgetModel3D, mitkOrthogonalImageModel, mitkPolygonWidgetModel2D, mitkPseudocolorWidgetModel, mitkPseudocolorWidgetModelEx, mitkRectWidgetModel2D, mitkReslicePlaneWidgetModel, mitkSurfaceModel, and mitkVolumeModel.

void mitkModel::Reset  ) 
 

Reset all the geometric transformation

virtual void mitkModel::Select mitkScene scene  )  [inline, virtual]
 

Selecting object in interactive mode using widgets.

Parameters:
scene the pointer of an mitkScene in which this model is contained.
Warning:
Class inherited from mitkModel should rewrite this method only if itself can be picked. If not, ensure doing nothing in this method.

Reimplemented in mitkWidgetModel.

void mitkModel::SetDataModifyStatus bool  isModify  )  [inline]
 

Set the status of source data.

Parameters:
isModify if the status of source data is modified

void mitkModel::SetOrigin float  origin[3]  )  [inline]
 

Set the origin of the model. This is the point about which all rotations take place.

Parameters:
origin[0] x-coordinate of the origin
origin[1] y-coordinate of the origin
origin[2] z-coordinate of the origin

void mitkModel::SetOrigin float  x,
float  y,
float  z
[inline]
 

Set the origin of the model. This is the point about which all rotations take place.

Parameters:
x x-coordinate of the origin
y y-coordinate of the origin
z z-coordinate of the origin

void mitkModel::SetRenderMode RenderMode  mode  )  [inline]
 

Set render mode. It's just a hint to the renderer. The final result of rendering relies on the actual implementation of render algorithm.

Parameters:
mode the render mode
See also:
RenderMode

void mitkModel::SetRenderModeToMedium  )  [inline]
 

Set render mode to medium mode. It's just a hint to the renderer. The final result of rendering relies on the actual implementation of render algorithm.

See also:
RenderMode

void mitkModel::SetRenderModeToRefined  )  [inline]
 

Set render mode to refined mode. It's just a hint to the renderer. The final result of rendering relies on the actual implementation of render algorithm.

See also:
RenderMode

void mitkModel::SetRenderModeToRough  )  [inline]
 

Set render mode to rough mode. It's just a hint to the renderer. The final result of rendering relies on the actual implementation of render algorithm.

See also:
RenderMode

void mitkModel::SetRotation float  ax,
float  ay,
float  az,
float  angle
[inline]
 

Set the rotation of the model.

Parameters:
ax x-coordinate of rotation axis
ay y-coordinate of rotation axis
az z-coordinate of rotation axis
angle the angle of rotation in degrees

void mitkModel::SetRotation const mitkQuaternion q  )  [inline]
 

Set the rotation of the model.

Parameters:
q the quaternion of rotation

void mitkModel::SetRotation float  rot[3]  )  [inline]
 

Set the rotation of the model.

Parameters:
rot[0] rotation around x-axis in degrees
rot[1] rotation around y-axis in degrees
rot[2] rotation around z-axis in degrees

void mitkModel::SetRotation float  x,
float  y,
float  z
[inline]
 

Set the rotation of the model.

Parameters:
x rotation around x-axis in degrees
y rotation around y-axis in degrees
z rotation around z-axis in degrees

void mitkModel::SetScale float  scale  )  [inline]
 

Set the scales in x, y and z axes of the model to the same value.

Parameters:
scale scale in x, y and z axes

void mitkModel::SetScale float  scale[3]  )  [inline]
 

Set the scale of the model.

Parameters:
scale[0] scale in x-axis
scale[1] scale in y-axis
scale[2] scale in z-axis

void mitkModel::SetScale float  sx,
float  sy,
float  sz
[inline]
 

Set the scale of the model.

Parameters:
sx scale in x-axis
sy scale in y-axis
sz scale in z-axis

void mitkModel::SetTranslation float  trans[3]  )  [inline]
 

Set the translation of the model.

Parameters:
trans[0] translation in x-axis
trans[1] translation in y-axis
trans[2] translation in z-axis

void mitkModel::SetTranslation float  x,
float  y,
float  z
[inline]
 

Set the translation of the model.

Parameters:
x translation in x-axis
y translation in y-axis
z translation in z-axis

void mitkModel::SetVisibility int  isVisible  )  [inline]
 

Set the visibility of this model.

Parameters:
isVisible if this model is visible (0 - invisible; 1 - visible)

void mitkModel::VisibilityOff void   )  [inline]
 

Set the visibility of this model off.

void mitkModel::VisibilityOn void   )  [inline]
 

Set the visibility of this model on.

void mitkModel::WorldToModel float const   worldPoint[4],
float  modelPoint[4]
[inline]
 

Transform a point from world coordinate to object(model) coordinate

Parameters:
worldPoint[4] a float array contains coordinates of the world point
modelPoint[4] a float array to return coordinates of the model point corresponding to the world point


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