Computer Assited Medical Intervention Tool Kit  version 3.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
List of all members
camitk::Slice Class Reference

Display a slice (i.e. More...

#include <Slice.h>

+ Inheritance diagram for camitk::Slice:

Protected Member Functions

Protected utility methods
virtual void init ()
 Initialize Attributes. More...
 
virtual void initActors ()
 Initialize actors and everything they need. More...
 

Protected Attributes

Attributes / Members of the class

*/

SliceOrientation sliceOrientation
 Direction of the reslice. More...
 
vtkSmartPointer< vtkImageData > originalVolume
 Smart pointer to the original volume to reslice (input of the vtk pipeline) More...
 
int extent [6]
 Table containing first and last indices of the image in each direction 0 & 1 -> x; 2 and 3 -> y; 4 & 5 -> z. More...
 
int currentSliceIndex
 Keep track of the slice number. More...
 
vtkSmartPointer
< vtkWindowLevelLookupTable > 
lut
 Common lookup table. More...
 
int originalDimensions [3]
 Original volume dimensions in number of voxels (x, y and z) More...
 
double originalSpacing [3]
 Voxel size of the original image volume. More...
 
double originalSize [3]
 Real size (originalDimension * originalSpacing in x, y and z) of the original image. More...
 
vtkSmartPointer
< vtkImageMapToColors > 
imgToMapFilter
 To be able to extract a slice. More...
 
vtkSmartPointer< vtkImageActor > image3DActor
 3D actor More...
 
vtkSmartPointer< vtkImageActor > image2DActor
 2D actor More...
 

Constructors / Destructors

enum  SliceOrientation { AXIAL, CORONAL, SAGITTAL, AXIAL_NEURO }
 Common slices orientation: axial, sagittal, coronal axial_neuro. More...
 
QMap< QString, vtkSmartPointer
< vtkProp > > 
extraProp
 The additional map for prop (include at least "label" and "glyph") More...
 
virtual vtkSmartPointer< vtkProp > getProp (const QString &)
 Return the vtkProp (actors, volumes and annotations) corresponding to the given name. More...
 
virtual unsigned int getNumberOfProp () const
 return the number of additional prop More...
 
virtual vtkSmartPointer< vtkProp > getProp (unsigned int)
 return an additional prop by its index More...
 
virtual bool addProp (const QString &, vtkSmartPointer< vtkProp >)
 insert an additional prop, defining it by its name (default visibility = false) More...
 
virtual bool removeProp (const QString &)
 remove a given additional prop. More...
 

Uses for picking

vtkSmartPointer< vtkPlaneSource > pickPlane
 A plane used for picking. More...
 
vtkSmartPointer
< vtkPolyDataMapper > 
pickPlaneMapper
 Mapper of the the pickPlane. More...
 
vtkSmartPointer< vtkActor > pickPlaneActor
 Actor representing the pickPlane. More...
 
vtkSmartPointer< vtkActor > pixelActor
 Actor representing a pixel, displayed over the image. More...
 
vtkSmartPointer< vtkAxesActor > axes2DActor
 
void initPixelActor ()
 Init the pixel actor for pixel picking. More...
 
void updatePixelActorPosition (double x, double y, double z)
 Update the pixel actor position according to the specified pixel picked by the user i.e. More...
 
void update2DAxesActorPosition ()
 
void init2DAxesActor ()
 

Detailed Description

Display a slice (i.e.

an image or BitMap) of an ImageComponent

Uses vtkImageActor::SetDisplayExtent for 3D and 2D Axial, Coronal and Sagittal representaiton. Re-position the camera for the 2D views.

*       3D Volume                         2D Slice
*       ________  /|\
*      /|      /|  |                      _______
*     /______ / | _|_slice     ===>      /       /        Displayed in
*    |  |____|_/|  |  number            /______ /         the window
*    | /     |//
*    |/______|/
*
*                                          ________________
*                                         | vtkLookUpTable |
*                                      ---|                |
*                                     |   |    lut         |
*                                     |   |________________|
*  setOriginalVolume(..)              |
*   |                                 | setLookUpTable
*   |                   setInput      |                                   __________________
*   |   ________________       _______v____________                      |  vtkImageActor   |
*   |  |  vtkImageData  |     | vtkImageMapToColor |                     |(setDisplayExtent)|
*   |_\|                |----\|                    |-------------------\ |                  |
*     /| originalVolume |----/|   imgToMapFilter   |-------------------/ |   image2DActor   |
*      |________________|     |____________________|     | |             |__________________|
*                                                        | |
*                                                        | |              _________________________            __________________
*                                                        | |             |  vtkTransformFilter     |          |  vtkImageActor   |
*                                                        |  -----------\ |(setWorldTransformation) | --------\|(setDisplayExtent)|
*                                                         -------------/ |                         | --------/|                  |
*                                                                        |                         |          |   image3DActor   |
*                                                                        |_________________________|          |__________________|
*
*
*
* 

Member Function Documentation

void camitk::Slice::init ( )
protectedvirtual

Initialize Attributes.

void camitk::Slice::init2DAxesActor ( )
protected
void camitk::Slice::initActors ( )
protectedvirtual

Initialize actors and everything they need.

void camitk::Slice::initPixelActor ( )
protected

Init the pixel actor for pixel picking.

References xMax, xMin, yMax, yMin, zMax, and zMin.

void camitk::Slice::update2DAxesActorPosition ( )
protected
void camitk::Slice::updatePixelActorPosition ( double  x,
double  y,
double  z 
)
protected

Update the pixel actor position according to the specified pixel picked by the user i.e.

Compute and draw the bounding box around the selected pixel.

Parameters
xThe absciss value of the selected pixel
yThe ordinate value of the selected pixel
zThe 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.

Member Data Documentation

vtkSmartPointer<vtkAxesActor> camitk::Slice::axes2DActor
protected
int camitk::Slice::currentSliceIndex
protected

Keep track of the slice number.

int camitk::Slice::extent[6]
protected

Table containing first and last indices of the image in each direction 0 & 1 -> x; 2 and 3 -> y; 4 & 5 -> z.

vtkSmartPointer<vtkImageActor> camitk::Slice::image2DActor
protected

2D actor

vtkSmartPointer<vtkImageActor> camitk::Slice::image3DActor
protected

3D actor

vtkSmartPointer<vtkImageMapToColors> camitk::Slice::imgToMapFilter
protected

To be able to extract a slice.

vtkSmartPointer<vtkWindowLevelLookupTable> camitk::Slice::lut
protected

Common lookup table.

int camitk::Slice::originalDimensions[3]
protected

Original volume dimensions in number of voxels (x, y and z)

double camitk::Slice::originalSize[3]
protected

Real size (originalDimension * originalSpacing in x, y and z) of the original image.

double camitk::Slice::originalSpacing[3]
protected

Voxel size of the original image volume.

Used to compute point coordinates between real world and index world.

vtkSmartPointer<vtkImageData> camitk::Slice::originalVolume
protected

Smart pointer to the original volume to reslice (input of the vtk pipeline)

vtkSmartPointer<vtkPlaneSource> camitk::Slice::pickPlane
protected

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<vtkActor> camitk::Slice::pickPlaneActor
protected

Actor representing the pickPlane.

vtkSmartPointer<vtkPolyDataMapper> camitk::Slice::pickPlaneMapper
protected

Mapper of the the pickPlane.

vtkSmartPointer<vtkActor> camitk::Slice::pixelActor
protected

Actor representing a pixel, displayed over the image.

SliceOrientation camitk::Slice::sliceOrientation
protected

Direction of the reslice.


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