Computer Assited Medical Intervention Tool Kit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Types | Public Member Functions | Private Attributes | List of all members
camitk::PlaneC Class Reference

This class allows you to transform a plane(translation,rotation around an axis) and visualize it. More...

#include <PlaneC.h>

Public Types

enum  PlaneCType {
  X_MIN, Y_MIN, Z_MIN, X_MAX,
  Y_MAX, Z_MAX, UNDEFINED
}
 a planeC could represent a plane of a bounding box More...

Public Member Functions

void clear ()
 Delete the plane from the View.
vtkSmartPointer< vtkActor > getActor ()
 get the actor of the plane
void getNormal (double tab[3])
 get the normal of the plane
void getOrigin (double tab[3])
 get the origin of the plane
void getTransformationInPercent (double *, double *, double *)
 get the transformation (translation, rot1 and rot2) in percentage
void init (PlaneCType type, double bounds[6])
 Initialize the plane at a particular place of a bounding box.
 PlaneC ()
 Constructor by default.
void rotationAxe1 ()
 Rotate the plane around Axe1.
void rotationAxe2 ()
 Rotate the plane around Axe2.
void setOrigin (double, double, double)
 Initilize the origin of the plane.
void setTransfoPercentToRealValue (double tab[3], double, double)
 set the transformation (translation, rot1 and rot2)and convert percentage to real value
void setTranslationMaxInPercent (double)
 set the translation value of the plane max to 100%
void setVisuActivePlane ()
 Visualization of the plane in red tone.
void setVisuActivePlaneOff ()
 Visualization of the plane in blue tone.
void setVisuPlane ()
 Visualization of the plane in wireframe.
void setXAxisPoint (double, double, double)
 The local x-axis vector will be set to (PointX - Origin) .
void setYAxisPoint (double, double, double)
 The local y-axis vector will be set to (PointY - Origin) .
void translatePlaneX ()
 Translate the plane on XAxis.
void translatePlaneY ()
 Translate the plane on YAxis.
void translatePlaneZ ()
 Translate the plane on ZAxis.
 ~PlaneC ()
 Destructor.

Private Attributes

double angle1
 difference between current and initial position
double angle2
vtkSmartPointer< vtkProperty > aProp
vtkSmartPointer< vtkPlaneSource > plane
vtkSmartPointer< vtkActor > planeActor
vtkSmartPointer
< vtkPolyDataMapper > 
planeMapper
double transfor [3]
 store the transformation
double translat
 store the translation in percentage
double translation1

Detailed Description

This class allows you to transform a plane(translation,rotation around an axis) and visualize it.

This is a pure vtk wrapper class (no Core stuff).

Member Enumeration Documentation

a planeC could represent a plane of a bounding box

Enumerator:
X_MIN 

the plane's normal is in X direction, the plane is at the min x

Y_MIN 

the plane's normal is in Y direction, the plane is at the min y

Z_MIN 

the plane's normal is in Z direction, the plane is at the min z

X_MAX 

the plane's normal is in X direction, the plane is at the max x

Y_MAX 

the plane's normal is in Y direction, the plane is at the max y

Z_MAX 

the plane's normal is in Z direction, the plane is at the max z

UNDEFINED 

the plane's normal is not defined yet

Constructor & Destructor Documentation

camitk::PlaneC::PlaneC ( )

Constructor by default.

References aProp, clear(), plane, planeActor, planeMapper, and setVisuPlane().

camitk::PlaneC::~PlaneC ( )

Destructor.

Member Function Documentation

void camitk::PlaneC::clear ( )

Delete the plane from the View.

References angle1, angle2, plane, transfor, translat, and translation1.

Referenced by PlaneC().

vtkSmartPointer< vtkActor > camitk::PlaneC::getActor ( )

get the actor of the plane

References planeActor.

void camitk::PlaneC::getNormal ( double  tab[3])

get the normal of the plane

References plane.

void camitk::PlaneC::getOrigin ( double  tab[3])

get the origin of the plane

References plane.

void camitk::PlaneC::getTransformationInPercent ( double *  t,
double *  r1,
double *  r2 
)

get the transformation (translation, rot1 and rot2) in percentage

References transfor.

void camitk::PlaneC::init ( PlaneC::PlaneCType  type,
double  bounds[6] 
)

Initialize the plane at a particular place of a bounding box.

Parameters
typethe type of the plane (see enum PlaneCType)
boundsan array of 6 doubles representing the bounding box (the six values have to be put in the correct order : xmin, ymin, zmin, xmax, ymax, zmax)

References setOrigin(), setTranslationMaxInPercent(), setXAxisPoint(), setYAxisPoint(), translatePlaneX(), translatePlaneY(), translatePlaneZ(), UNDEFINED, X_MAX, X_MIN, Y_MAX, Y_MIN, Z_MAX, and Z_MIN.

void camitk::PlaneC::rotationAxe1 ( )

Rotate the plane around Axe1.

References angle1, plane, and transfor.

void camitk::PlaneC::rotationAxe2 ( )

Rotate the plane around Axe2.

References angle2, plane, and transfor.

void camitk::PlaneC::setOrigin ( double  x,
double  y,
double  z 
)

Initilize the origin of the plane.

References plane.

Referenced by init().

void camitk::PlaneC::setTransfoPercentToRealValue ( double  tab[3],
double  min,
double  max 
)

set the transformation (translation, rot1 and rot2)and convert percentage to real value

References transfor, and translat.

void camitk::PlaneC::setTranslationMaxInPercent ( double  trans)

set the translation value of the plane max to 100%

References transfor, and translat.

Referenced by init().

void camitk::PlaneC::setVisuActivePlane ( )

Visualization of the plane in red tone.

References aProp, and planeActor.

void camitk::PlaneC::setVisuActivePlaneOff ( )

Visualization of the plane in blue tone.

References aProp, and planeActor.

void camitk::PlaneC::setVisuPlane ( )

Visualization of the plane in wireframe.

References aProp, and planeActor.

Referenced by PlaneC().

void camitk::PlaneC::setXAxisPoint ( double  x,
double  y,
double  z 
)

The local x-axis vector will be set to (PointX - Origin) .

The normal of the plane is defined by the cross product (x-axis, y-axis)

References plane.

Referenced by init().

void camitk::PlaneC::setYAxisPoint ( double  x,
double  y,
double  z 
)

The local y-axis vector will be set to (PointY - Origin) .

The normal of the plane is defined by the cross product (x-axis, y-axis)

References plane.

Referenced by init().

void camitk::PlaneC::translatePlaneX ( )

Translate the plane on XAxis.

References plane, translat, and translation1.

Referenced by init().

void camitk::PlaneC::translatePlaneY ( )

Translate the plane on YAxis.

References plane, translat, and translation1.

Referenced by init().

void camitk::PlaneC::translatePlaneZ ( )

Translate the plane on ZAxis.

References plane, translat, and translation1.

Referenced by init().

Member Data Documentation

double camitk::PlaneC::angle1
private

difference between current and initial position

Referenced by clear(), and rotationAxe1().

double camitk::PlaneC::angle2
private

Referenced by clear(), and rotationAxe2().

vtkSmartPointer<vtkProperty> camitk::PlaneC::aProp
private
vtkSmartPointer<vtkPlaneSource> camitk::PlaneC::plane
private
vtkSmartPointer<vtkActor> camitk::PlaneC::planeActor
private
vtkSmartPointer<vtkPolyDataMapper> camitk::PlaneC::planeMapper
private

Referenced by PlaneC().

double camitk::PlaneC::transfor[3]
private
double camitk::PlaneC::translat
private
double camitk::PlaneC::translation1
private

The documentation for this class was generated from the following files: