Computer Assited Medical Intervention Tool Kit
version 4.1
|
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. More... | |
vtkSmartPointer< vtkActor > | getActor () |
get the actor of the plane More... | |
void | getNormal (double *tab) |
get the normal of the plane More... | |
void | getOrigin (double *tab) |
get the origin of the plane More... | |
void | getTransformationInPercent (double *, double *, double *) |
get the transformation (translation, rot1 and rot2) in percentage More... | |
void | init (PlaneCType type, double *bounds) |
Initialize the plane at a particular place of a bounding box. More... | |
PlaneC () | |
Constructor by default. More... | |
void | rotationAxe1 () |
Rotate the plane around Axe1. More... | |
void | rotationAxe2 () |
Rotate the plane around Axe2. More... | |
void | setOrigin (double, double, double) |
Initilize the origin of the plane. More... | |
void | setTransfoPercentToRealValue (double *tab, double, double) |
set the transformation (translation, rot1 and rot2)and convert percentage to real value More... | |
void | setTranslationMaxInPercent (double) |
set the translation value of the plane max to 100% More... | |
void | setVisuActivePlane () |
Visualization of the plane in red tone. More... | |
void | setVisuActivePlaneOff () |
Visualization of the plane in blue tone. More... | |
void | setVisuPlane () |
Visualization of the plane in wireframe. More... | |
void | setXAxisPoint (double, double, double) |
The local x-axis vector will be set to (PointX - Origin) . More... | |
void | setYAxisPoint (double, double, double) |
The local y-axis vector will be set to (PointY - Origin) . More... | |
void | translatePlaneX () |
Translate the plane on XAxis. More... | |
void | translatePlaneY () |
Translate the plane on YAxis. More... | |
void | translatePlaneZ () |
Translate the plane on ZAxis. More... | |
~PlaneC () | |
Destructor. More... | |
Private Attributes | |
double | angle1 |
difference between current and initial position More... | |
double | angle2 |
vtkSmartPointer< vtkProperty > | aProp |
vtkSmartPointer< vtkPlaneSource > | plane |
vtkSmartPointer< vtkActor > | planeActor |
vtkSmartPointer< vtkPolyDataMapper > | planeMapper |
double | transformation [3] |
store the transformation More... | |
double | translation |
store the translation in percentage More... | |
double | translation1 |
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).
a planeC could represent a plane of a bounding box
camitk::PlaneC::PlaneC | ( | ) |
Constructor by default.
References aProp, clear(), plane, planeActor, planeMapper, and setVisuPlane().
camitk::PlaneC::~PlaneC | ( | ) |
Destructor.
void camitk::PlaneC::clear | ( | ) |
Delete the plane from the View.
References angle1, angle2, plane, transformation, translation, and translation1.
Referenced by PlaneC().
vtkSmartPointer< vtkActor > camitk::PlaneC::getActor | ( | ) |
get the actor of the plane
References planeActor.
void camitk::PlaneC::getNormal | ( | double * | tab | ) |
get the normal of the plane
References plane.
void camitk::PlaneC::getOrigin | ( | double * | tab | ) |
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 transformation.
void camitk::PlaneC::init | ( | PlaneC::PlaneCType | type, |
double * | bounds | ||
) |
Initialize the plane at a particular place of a bounding box.
type | the type of the plane (see enum PlaneCType) |
bounds | an 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 transformation.
void camitk::PlaneC::rotationAxe2 | ( | ) |
Rotate the plane around Axe2.
References angle2, plane, and transformation.
void camitk::PlaneC::setOrigin | ( | double | x, |
double | y, | ||
double | z | ||
) |
void camitk::PlaneC::setTransfoPercentToRealValue | ( | double * | tab, |
double | min, | ||
double | max | ||
) |
set the transformation (translation, rot1 and rot2)and convert percentage to real value
References transformation, and translation.
void camitk::PlaneC::setTranslationMaxInPercent | ( | double | trans | ) |
set the translation value of the plane max to 100%
References transformation, and translation.
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 | ( | ) |
void camitk::PlaneC::setXAxisPoint | ( | double | x, |
double | y, | ||
double | z | ||
) |
void camitk::PlaneC::setYAxisPoint | ( | double | x, |
double | y, | ||
double | z | ||
) |
void camitk::PlaneC::translatePlaneX | ( | ) |
Translate the plane on XAxis.
References a, plane, translation, and translation1.
Referenced by init().
void camitk::PlaneC::translatePlaneY | ( | ) |
Translate the plane on YAxis.
References a, plane, translation, and translation1.
Referenced by init().
void camitk::PlaneC::translatePlaneZ | ( | ) |
Translate the plane on ZAxis.
References a, plane, translation, and translation1.
Referenced by init().
|
private |
difference between current and initial position
Referenced by clear(), and rotationAxe1().
|
private |
Referenced by clear(), and rotationAxe2().
|
private |
Referenced by PlaneC(), setVisuActivePlane(), setVisuActivePlaneOff(), and setVisuPlane().
|
private |
Referenced by clear(), getNormal(), getOrigin(), PlaneC(), rotationAxe1(), rotationAxe2(), setOrigin(), setXAxisPoint(), setYAxisPoint(), translatePlaneX(), translatePlaneY(), and translatePlaneZ().
|
private |
Referenced by getActor(), PlaneC(), setVisuActivePlane(), setVisuActivePlaneOff(), and setVisuPlane().
|
private |
Referenced by PlaneC().
|
private |
store the transformation
Referenced by clear(), getTransformationInPercent(), rotationAxe1(), rotationAxe2(), setTransfoPercentToRealValue(), and setTranslationMaxInPercent().
|
private |
store the translation in percentage
Referenced by clear(), setTransfoPercentToRealValue(), setTranslationMaxInPercent(), translatePlaneX(), translatePlaneY(), and translatePlaneZ().
|
private |
Referenced by clear(), translatePlaneX(), translatePlaneY(), and translatePlaneZ().