26 #ifndef CANONICAL_SLICE_H
27 #define CANONICAL_SLICE_H
34 #include <vtkSmartPointer.h>
35 #include <vtkWindowLevelLookupTable.h>
36 #include <vtkImageMapToColors.h>
38 #include <vtkImageActor.h>
39 #include <vtkImageChangeInformation.h>
40 #include <vtkImageReslice.h>
41 #include <vtkMatrix4x4.h>
42 #include <vtkPolyDataMapper.h>
43 #include <vtkPlaneSource.h>
44 #include <vtkTransform.h>
46 #include <vtkUnstructuredGrid.h>
47 #include <vtkDataSetMapper.h>
49 #include <vtkPolygon.h>
50 #include <vtkTextProperty.h>
51 #include <vtkTextMapper.h>
52 #include <vtkAxesActor.h>
53 #include <vtkTransformPolyDataFilter.h>
142 Slice(vtkSmartPointer<vtkImageData> volume, PossibleOrientation AXIAL_ORIENTATION, vtkSmartPointer<vtkWindowLevelLookupTable> lookupTable=NULL);
146 Slice(vtkSmartPointer<vtkImageData> volume, SliceOrientation AXIAL_ORIENTATION, vtkSmartPointer<vtkWindowLevelLookupTable> lookupTable=NULL);
158 virtual void setOriginalVolume(vtkSmartPointer<vtkImageData> img);
161 virtual void setImageWorldTransform(vtkSmartPointer<vtkTransform>);
165 virtual vtkSmartPointer<vtkImageActor> get2DImageActor()
const;
168 virtual vtkSmartPointer<vtkImageActor> get3DImageActor()
const;
172 virtual vtkSmartPointer<vtkActor> getPickPlaneActor()
const;
175 virtual vtkSmartPointer<vtkActor> getPixelActor();
178 virtual vtkSmartPointer<vtkAxesActor> get2DAxesActor();
183 virtual void pixelPicked(
double,
double,
double);
190 void reslicedToVolumeCoords(
const double *ijk,
double *xyz);
193 void volumeToReslicedCoords(
const double *xyz,
double *ijk);
195 virtual void updatePickPlane();
198 virtual int getNumberOfSlices()
const;
201 virtual int getSlice()
const;
207 virtual void setSlice(
int s);
210 virtual void setSlice(
double x,
double y,
double z);
215 virtual int getNumberOfColors()
const;
218 virtual void setPixelRealPosition(
double,
double,
double);
225 virtual vtkSmartPointer<vtkImageData> getImageData()
const {
230 virtual double getRotationX()
const {
235 virtual double getRotationY()
const {
240 virtual double getRotationZ()
const {
246 virtual void setRotationX(
double angle) {};
249 virtual void setRotationY(
double angle) {};
252 virtual void setRotationZ(
double angle) {};
255 void applyRotation() {};
263 virtual vtkSmartPointer<vtkProp> getProp(
const QString &);
266 virtual unsigned int getNumberOfProp()
const;
269 virtual vtkSmartPointer<vtkProp> getProp(
unsigned int);
274 virtual bool addProp(
const QString &, vtkSmartPointer<vtkProp>);
279 virtual bool removeProp(
const QString &);
294 virtual void initActors();
302 void setSliceOrientation(PossibleOrientation orientation);
306 void setInitialSlicerTransformation() {};
311 void updateLocalTransformation() {};
315 void computeReslicedDimensions() {};
322 void setTransformOrientation(
double *xCosines,
double *yCosines,
double *zCosines);
330 void setTransformOrigin(
double *resliceOrigin);
355 vtkSmartPointer<vtkWindowLevelLookupTable>
lut;
358 int originalDimensions[3];
361 double originalSpacing[3];
364 double originalSize[3];
394 void initPixelActor();
406 void updatePixelActorPosition(
double x,
double y,
double z);
413 void update2DAxesActorPosition();
414 void init2DAxesActor();
422 #endif // CANONICAL_SLICE_H
SliceOrientation sliceOrientation
Direction of the reslice.
Definition: Slice.h:342
void init()
Definition: obj2pml.cpp:213
vtkSmartPointer< vtkAxesActor > axes2DActor
Definition: Slice.h:415
vtkSmartPointer< vtkPlaneSource > pickPlane
A plane used for picking.
Definition: Slice.h:382
vtkSmartPointer< vtkActor > pickPlaneActor
Actor representing the pickPlane.
Definition: Slice.h:388
int currentSliceIndex
Keep track of the slice number.
Definition: Slice.h:352
Display a slice (i.e.
Definition: Slice.h:102
Definition: Action.cpp:40
vtkSmartPointer< vtkImageMapToColors > imgToMapFilter
To be able to extract a slice.
Definition: Slice.h:367
SliceOrientation
Common slices orientation: axial, sagittal, coronal axial_neuro.
Definition: Slice.h:130
#define CAMITK_API
Definition: CamiTKAPI.h:49
vtkSmartPointer< vtkImageData > originalVolume
Smart pointer to the original volume to reslice (input of the vtk pipeline)
Definition: Slice.h:345
QMap< QString, vtkSmartPointer< vtkProp > > extraProp
The additional map for prop (include at least "label" and "glyph")
Definition: Slice.h:260
vtkSmartPointer< vtkActor > pixelActor
Actor representing a pixel, displayed over the image.
Definition: Slice.h:410
vtkSmartPointer< vtkImageActor > image3DActor
3D actor
Definition: Slice.h:370
vtkSmartPointer< vtkWindowLevelLookupTable > lut
Common lookup table.
Definition: Slice.h:355
vtkSmartPointer< vtkImageActor > image2DActor
2D actor
Definition: Slice.h:372
vtkSmartPointer< vtkPolyDataMapper > pickPlaneMapper
Mapper of the the pickPlane.
Definition: Slice.h:385