Commit fbfcc3b5 authored by Emmanuel Promayon's avatar Emmanuel Promayon

FIXED code cleaning and simplification

parent 21dc1629
This diff is collapsed.
......@@ -32,25 +32,15 @@
// -- vtk stuff
#include <vtkSmartPointer.h>
#include <vtkImageData.h>
#include <vtkWindowLevelLookupTable.h>
#include <vtkTransform.h>
#include <vtkImageMapToColors.h>
#include <vtkActor.h>
#include <vtkImageActor.h>
#include <vtkImageChangeInformation.h>
#include <vtkImageReslice.h>
#include <vtkMatrix4x4.h>
#include <vtkPolyDataMapper.h>
#include <vtkPlaneSource.h>
#include <vtkTransform.h>
#include <vtkPixel.h>
#include <vtkUnstructuredGrid.h>
#include <vtkDataSetMapper.h>
#include <vtkLine.h>
#include <vtkPolygon.h>
#include <vtkTextProperty.h>
#include <vtkTextMapper.h>
#include <vtkAxesActor.h>
#include <vtkTransformPolyDataFilter.h>
namespace camitk {
/**
......@@ -296,18 +286,9 @@ protected:
/// @name Used to visualize the current picking
/// @{
/** A plane used for picking.
* This plane has the same size and position as the displayed slice. However, it is a
* real vtkActor that can be easily picked (using 'p' ot 'Ctrl+left click').
*/
vtkSmartPointer<vtkPlaneSource> pickPlane;
/** Mapper of the the pickPlane. */
vtkSmartPointer<vtkPolyDataMapper> pickPlaneMapper;
/** Actor representing the pickPlane. */
vtkSmartPointer<vtkActor> pickPlaneActor;
/// init the pick plane actor
void initPickPlaneActor();
/**
* Init the pixel actor for pixel picking
*/
......@@ -323,23 +304,28 @@ protected:
* The depth value of the selected pixel. In the plane, it's always +/- 0.01 in order to the pixel actor to be
* visible over the slice.
**/
void updatePixelActorPosition(double x, double y, double z);
void updatePixelActor(double x, double y, double z);
/// update the pixel actor to the middle of the current slice
void updatePixelActorPosition();
void updatePixelActor();
/** A plane used for picking.
* This plane has the same size and position as the displayed slice. However, it is a
* real vtkActor that can be easily picked (using 'p' ot 'Ctrl+left click').
*/
vtkSmartPointer<vtkPlaneSource> pickPlane;
/** Mapper of the the pickPlane. */
vtkSmartPointer<vtkPolyDataMapper> pickPlaneMapper;
/** Actor representing the pickPlane. */
vtkSmartPointer<vtkActor> pickPlaneActor;
/** Actor representing a pixel, displayed over the image. */
vtkSmartPointer<vtkActor> pixelActor;
/** Compute the out of plane shift depending on the orientation
* As the camera is facing the slice from one direction or another depending on the orientation,
* the extra decoration (pixel actor and plane actor) should be shifted a little bit towards
* the camera to guarantee their visibility without any depth/z-buffer problems.
*
* This method computes the value of the shift in world's unit depending on the orientation and
* slice thickness.
*/
double getOutOfPlaneShift();
/// the pixel actor unstructured grid
vtkSmartPointer<vtkUnstructuredGrid> pixelActorPointSet;
/// @}
/// @name manage extra prop associated with a 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