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>
111 Slice(vtkSmartPointer<vtkImageData> volume, PossibleOrientation AXIAL_ORIENTATION, vtkSmartPointer<vtkWindowLevelLookupTable> lookupTable=NULL);
123 virtual vtkSmartPointer<vtkImageData> getImageData()
const;
126 virtual void setOriginalVolume(vtkSmartPointer<vtkImageData> img);
129 virtual vtkSmartPointer<vtkImageActor> get2DImageActor()
const;
132 virtual vtkSmartPointer<vtkImageActor> get3DImageActor()
const;
136 virtual vtkSmartPointer<vtkActor> getPickPlaneActor()
const;
139 virtual vtkSmartPointer<vtkActor> getPixelActor();
144 virtual void pixelPicked(
double,
double,
double);
151 void reslicedToVolumeCoords(
const double ijk[3],
double xyz[3]);
154 void volumeToReslicedCoords(
const double xyz[3],
double ijk[3]);
156 virtual void updatePickPlane();
159 virtual int getNumberOfSlices()
const;
162 virtual int getSlice()
const;
168 virtual void setSlice(
int s);
171 virtual void setSlice(
double x,
double y,
double z);
175 return currentXAngle;
178 return currentYAngle;
181 return currentZAngle;
185 virtual void setRotationX(
double angle);
186 virtual void setRotationY(
double angle);
187 virtual void setRotationZ(
double angle);
188 void applyRotation();
193 virtual int getNumberOfColors()
const;
196 virtual void setPixelRealPosition(
double,
double,
double);
203 virtual vtkSmartPointer<vtkProp> getProp(
const QString &);
206 virtual unsigned int getNumberOfProp()
const;
209 virtual vtkSmartPointer<vtkProp> getProp(
unsigned int);
214 virtual bool addProp(
const QString &, vtkSmartPointer<vtkProp>);
219 virtual bool removeProp(
const QString &);
233 void setTransformOrientation(
double xCosines[3],
double yCosines[3],
double zCosines[3]);
239 void setTransformOrigin(
double resliceOrigin[3]);
245 void setInitialSlicerTransformation();
249 void updateLocalTransformation();
252 void computeReslicedDimensions();
255 void setSliceOrientation(PossibleOrientation orientation);
285 int originalDimensions[3];
288 int reslicedDimensions[3];
291 double originalSpacing[3];
294 double resliceSpacing[3];
316 vtkSmartPointer<vtkWindowLevelLookupTable>
lut;
326 vtkSmartPointer<vtkImageReslice> image2DReslicer;
354 void initPixelActor();
366 void updatePixelActorPosition(
double x,
double y,
double z);
376 #endif // CANONICAL_SLICE_H
This class describes what are the methods to implement for a BitMap.
Definition: InterfaceBitMap.h:59
vtkSmartPointer< vtkPlaneSource > pickPlane
A plane used for picking.
Definition: Slice.h:342
virtual double getRotationY() const
Definition: Slice.h:177
QMap< QString, vtkSmartPointer< vtkProp > > extraProp
The additional map for prop (include at least "label" and "glyph".
Definition: Slice.h:200
vtkSmartPointer< vtkActor > pickPlaneActor
Actor representing the pickPlane.
Definition: Slice.h:348
vtkSmartPointer< vtkTransform > transformReslice2Volume
Transformation between the reslice volume and the original volume.
Definition: Slice.h:308
int currentSliceIndex
Keep track of the slice number.
Definition: Slice.h:313
Display a slice (i.e.
Definition: Slice.h:101
vtkSmartPointer< vtkMatrix4x4 > coordsTransform
Transform matrix between resliced and original coords.
Definition: Slice.h:302
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:330
virtual ~Slice()
virtual destructor
Definition: Slice.h:114
vtkSmartPointer< vtkImageMapToColors > imgToMapFilter
To be able to extract a slice.
Definition: Slice.h:319
#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:274
double currentXAngle
Angle apply to the arbitrary slice.
Definition: Slice.h:297
double currentYAngle
Definition: Slice.h:298
vtkSmartPointer< vtkActor > pixelActor
Actor representing a pixel, displayed over the image.
Definition: Slice.h:370
virtual double getRotationX() const
Return the current angle applied to the arbitrary slice.
Definition: Slice.h:174
vtkSmartPointer< vtkMatrix4x4 > sliceCoordsTransform
Transform matrix between resliced and original coords taking the slice number into account...
Definition: Slice.h:305
vtkSmartPointer< vtkImageActor > image3DActor
3D actor
Definition: Slice.h:322
PossibleOrientation sliceOrientation
Direction of the reslice.
Definition: Slice.h:271
vtkSmartPointer< vtkWindowLevelLookupTable > lut
Common lookup table.
Definition: Slice.h:316
virtual double getRotationZ() const
Definition: Slice.h:180
double currentZAngle
Definition: Slice.h:299
vtkSmartPointer< vtkImageActor > image2DActor
2D actor itself
Definition: Slice.h:332
vtkSmartPointer< vtkPolyDataMapper > pickPlaneMapper
Mapper of the the pickPlane.
Definition: Slice.h:345