Commit 42343ce0 authored by Emmanuel Promayon's avatar Emmanuel Promayon

FIXED improved Slice API doc

parent 0af24b27
......@@ -133,7 +133,6 @@ void Slice::volumeToReslicedCoords(const double* xyz, double* ijk) {
// -------------------- getNumberOfSlices --------------------
int Slice::getNumberOfSlices() const {
// Array containing first and last indices of the image in each direction
// 0 & 1 -> x; 2 and 3 -> y; 4 & 5 -> z
int extent[6];
......@@ -249,7 +248,6 @@ void Slice::setPixelRealPosition(double x, double y, double z) {
updatePixelActor(x, y, z);
}
// -------------------- get2DImageActor --------------------
vtkSmartPointer<vtkImageActor> Slice::get2DImageActor() const {
return image2DActor;
......@@ -299,12 +297,7 @@ void Slice::initActors() {
// -------------------- initPickPlaneActor --------------------
void Slice::initPickPlaneActor() {
// create the pixel actor 3D geometry
// Create the 8 points that describes the plane.
// The points are set at the coordinates of the (red / blue / green) border of the current image plane.
// To make sure that the borders are visible in any specific orientation,
// for quads are build. Each quad goes out of the image plane on both side
// (hit "t" on the slice viewer and move the camera around to see the quad geometries)
// create the picked plane actor 3D geometry
vtkSmartPointer<vtkPoints> planePoints = vtkSmartPointer<vtkPoints>::New();
planePoints->SetNumberOfPoints(8);
......@@ -388,11 +381,6 @@ void Slice::initPickPlaneActor() {
// -------------------- initPixelActor --------------------
void Slice::initPixelActor() {
// create the pixel actor 3D geometry
// Create the 8 points that describes the cross centered on the currently picked pixel
// The points are set at the coordinates of the (red / blue / green) cross around the picked pixel
// to make sure that the cross is visible in any specific orientation,
// two quads are build. Each quad goes out of the image plane on both side
// (hit "t" on the slice viewer and move the camera around to see the quad geometries)
vtkSmartPointer<vtkPoints> pixelPoints = vtkSmartPointer<vtkPoints>::New();
pixelPoints->SetNumberOfPoints(8);
......@@ -595,7 +583,6 @@ bool Slice::addProp(const QString& name, vtkSmartPointer< vtkProp > prop) {
//------------------------------- getProp ----------------------------------------
vtkSmartPointer< vtkProp > Slice::getProp(const QString& name) {
if (extraProp.contains(name)) {
return extraProp.value(name);
}
......
......@@ -43,14 +43,38 @@ namespace camitk {
* @ingroup group_sdk_libraries_core_component
*
* @brief
* Display a slice (i.e. an image or BitMap) of an @ref camitk::ImageComponent "ImageComponent"
*
* Uses vtkImageActor::SetDisplayExtent for 3D and 2D Axial, Coronal and Sagittal representaiton.
* Re-position the camera for the 2D views.
* Display a slice (i.e. an image or BitMap) of an @ref camitk::ImageComponent "ImageComponent". Helper class.
*
* This class manages the visual representation of one slice of a volume image.
* The slice depends on the orientation and the currently selected slice index.
*
* A slice is represented in 2D and 3D thanks to:
* - image2DActor that provides a 2D representation (the slice in the world reference frame)
* - image3DActor that provides a 3D representation (the slice at this actual 3D position)
* Both are updated thanks to vtkImageActor::SetDisplayExtent.
*
* \note the setImageWorldTransform(...) methods is used to set the user transform of the image 3D actor.
*
* Slice also manages two other actors to visualize user picking inside the image:
* -
* - the picked plane actor (a wireframe box made of 4 quads around the picked plane) that shows the image border
* - the picked pixel actor (two wireframe quads centered on the currently picked pixel) that shows the position
* of the currently picked pixel.
* These two actors are build using unstructured grids.
*
* The picked plane actor is defined by 8 points surrounding the current image plane.
* The points are set at the coordinates of the (red / blue / green) border of the current image plane.
* To make sure that the borders are visible in any specific orientation, four quads are build from this points.
* Each quad goes out of the image plane on both side (back and front).
*
* The picked pixel actor is also made of 8 points that describes the cross centered on the currently picked pixel.
* The points are set at the coordinates of the (red / blue / green) cross around the picked pixel.
* To make sure that the cross is visible in any specific orientation, two quads are build from this 8 points
* Each quad goes out of the image plane on both side
*
* \note (easter egg) hit "t" on any slice viewer and move the camera around to see the quad geometries and
* how these extra actors are build.
*
*
* \verbatim
* 3D Volume 2D Slice
* ________ /|\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment