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>
115 Slice(vtkSmartPointer<vtkImageData> volume, PossibleOrientation AXIAL_ORIENTATION, vtkSmartPointer<vtkWindowLevelLookupTable> lookupTable=NULL);
127 virtual vtkSmartPointer<vtkImageData> getImageData()
const;
130 virtual void setOriginalVolume(vtkSmartPointer<vtkImageData> img);
133 virtual vtkSmartPointer<vtkImageActor> get2DImageActor()
const;
136 virtual vtkSmartPointer<vtkImageActor> get3DImageActor()
const;
140 virtual vtkSmartPointer<vtkActor> getPickPlaneActor()
const;
143 virtual vtkSmartPointer<vtkActor> getPixelActor();
148 virtual void pixelPicked(
double,
double,
double);
155 void reslicedToVolumeCoords(
const double *ijk,
double *xyz);
158 void volumeToReslicedCoords(
const double *xyz,
double *ijk);
160 virtual void updatePickPlane();
163 virtual int getNumberOfSlices()
const;
166 virtual int getSlice()
const;
172 virtual void setSlice(
int s);
175 virtual void setSlice(
double x,
double y,
double z);
179 return currentXAngle;
182 return currentYAngle;
185 return currentZAngle;
189 virtual void setRotationX(
double angle);
190 virtual void setRotationY(
double angle);
191 virtual void setRotationZ(
double angle);
192 void applyRotation();
197 virtual int getNumberOfColors()
const;
200 virtual void setPixelRealPosition(
double,
double,
double);
207 virtual vtkSmartPointer<vtkProp> getProp(
const QString &);
210 virtual unsigned int getNumberOfProp()
const;
213 virtual vtkSmartPointer<vtkProp> getProp(
unsigned int);
218 virtual bool addProp(
const QString &, vtkSmartPointer<vtkProp>);
223 virtual bool removeProp(
const QString &);
238 void setTransformOrientation(
double *xCosines,
double *yCosines,
double *zCosines);
245 void setTransformOrigin(
double *resliceOrigin);
251 void setInitialSlicerTransformation();
255 void updateLocalTransformation();
258 void computeReslicedDimensions();
261 void setSliceOrientation(PossibleOrientation orientation);
291 int originalDimensions[3];
294 int reslicedDimensions[3];
297 double originalSpacing[3];
300 double resliceSpacing[3];
322 vtkSmartPointer<vtkWindowLevelLookupTable>
lut;
332 vtkSmartPointer<vtkImageReslice> image2DReslicer;
360 void initPixelActor();
372 void updatePixelActorPosition(
double x,
double y,
double z);
382 #endif // CANONICAL_SLICE_H
This class describes what are the methods to implement for a BitMap.
Definition: InterfaceBitMap.h:63
vtkSmartPointer< vtkPlaneSource > pickPlane
A plane used for picking.
Definition: Slice.h:348
virtual double getRotationY() const
Definition: Slice.h:181
QMap< QString, vtkSmartPointer< vtkProp > > extraProp
The additional map for prop (include at least "label" and "glyph".
Definition: Slice.h:204
vtkSmartPointer< vtkActor > pickPlaneActor
Actor representing the pickPlane.
Definition: Slice.h:354
vtkSmartPointer< vtkTransform > transformReslice2Volume
Transformation between the reslice volume and the original volume.
Definition: Slice.h:314
int currentSliceIndex
Keep track of the slice number.
Definition: Slice.h:319
Display a slice (i.e.
Definition: Slice.h:105
vtkSmartPointer< vtkMatrix4x4 > coordsTransform
Transform matrix between resliced and original coords.
Definition: Slice.h:308
vtkSmartPointer< vtkImageChangeInformation > image2DChangeInfo
To put the origin of the reslicer at (0, 0, 0) (mandatory to visualize 2D actor (axial, coronal or sagittal) properly in a 2D window)
Definition: Slice.h:336
virtual ~Slice()
virtual destructor
Definition: Slice.h:118
vtkSmartPointer< vtkImageMapToColors > imgToMapFilter
To be able to extract a slice.
Definition: Slice.h:325
#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:280
double currentXAngle
Angle apply to the arbitrary slice.
Definition: Slice.h:303
double currentYAngle
Definition: Slice.h:304
vtkSmartPointer< vtkActor > pixelActor
Actor representing a pixel, displayed over the image.
Definition: Slice.h:376
virtual double getRotationX() const
Return the current angle applied to the arbitrary slice.
Definition: Slice.h:178
vtkSmartPointer< vtkMatrix4x4 > sliceCoordsTransform
Transform matrix between resliced and original coords taking the slice number into account...
Definition: Slice.h:311
vtkSmartPointer< vtkImageActor > image3DActor
3D actor
Definition: Slice.h:328
PossibleOrientation sliceOrientation
Direction of the reslice.
Definition: Slice.h:277
vtkSmartPointer< vtkWindowLevelLookupTable > lut
Common lookup table.
Definition: Slice.h:322
virtual double getRotationZ() const
Definition: Slice.h:184
double currentZAngle
Definition: Slice.h:305
vtkSmartPointer< vtkImageActor > image2DActor
2D actor itself
Definition: Slice.h:338
vtkSmartPointer< vtkPolyDataMapper > pickPlaneMapper
Mapper of the the pickPlane.
Definition: Slice.h:351