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> 141 Slice(vtkSmartPointer<vtkImageData> volume,
SliceOrientation AXIAL_ORIENTATION, vtkSmartPointer<vtkWindowLevelLookupTable> lookupTable =
nullptr);
153 void setOriginalVolume(vtkSmartPointer<vtkImageData> img)
override;
156 void setImageWorldTransform(vtkSmartPointer<vtkTransform>)
override;
159 vtkSmartPointer<vtkImageActor> get2DImageActor()
const override;
162 vtkSmartPointer<vtkImageActor> get3DImageActor()
const override;
165 vtkSmartPointer<vtkActor> getPickPlaneActor()
const override;
168 vtkSmartPointer<vtkActor> getPixelActor()
override;
171 virtual vtkSmartPointer<vtkAxesActor> get2DAxesActor();
176 void pixelPicked(
double,
double,
double)
override;
183 void reslicedToVolumeCoords(
const double* ijk,
double* xyz);
187 void volumeToReslicedCoords(
const double* xyz,
double* ijk);
189 void updatePickPlane()
override;
192 int getNumberOfSlices()
const override;
195 int getSlice()
const override;
201 void setSlice(
int s)
override;
204 void setSlice(
double x,
double y,
double z)
override;
209 int getNumberOfColors()
const override;
212 void setPixelRealPosition(
double,
double,
double)
override;
215 vtkSmartPointer<vtkImageData> getImageData()
const override;
222 vtkSmartPointer<vtkProp> getProp(
const QString&)
override;
225 unsigned int getNumberOfProp()
const override;
228 vtkSmartPointer<vtkProp> getProp(
unsigned int)
override;
233 bool addProp(
const QString&, vtkSmartPointer<vtkProp>)
override;
238 bool removeProp(
const QString&)
override;
253 virtual void initActors();
275 vtkSmartPointer<vtkWindowLevelLookupTable>
lut;
278 int originalDimensions[3];
281 double originalSpacing[3];
284 double originalSize[3];
315 void initPixelActor();
327 void updatePixelActorPosition(
double x,
double y,
double z);
334 void update2DAxesActorPosition();
335 void init2DAxesActor();
343 #endif // CANONICAL_SLICE_H SliceOrientation
Common slices orientation: axial, sagittal, coronal axial_neuro.
Definition: Slice.h:132
SliceOrientation sliceOrientation
Direction of the reslice.
Definition: Slice.h:262
This class describes what are the methods to implement for a BitMap.
Definition: InterfaceBitMap.h:63
vtkSmartPointer< vtkAxesActor > axes2DActor
Definition: Slice.h:336
vtkSmartPointer< vtkPlaneSource > pickPlane
A plane used for picking.
Definition: Slice.h:303
QMap< QString, vtkSmartPointer< vtkProp > > extraProp
The additional map for prop (include at least "label" and "glyph")
Definition: Slice.h:219
vtkSmartPointer< vtkActor > pickPlaneActor
Actor representing the pickPlane.
Definition: Slice.h:309
int currentSliceIndex
Keep track of the slice number.
Definition: Slice.h:272
Display a slice (i.e.
Definition: Slice.h:102
Definition: Action.cpp:36
vtkSmartPointer< vtkImageMapToColors > imgToMapFilter
To be able to extract a slice.
Definition: Slice.h:287
#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:265
vtkSmartPointer< vtkActor > pixelActor
Actor representing a pixel, displayed over the image.
Definition: Slice.h:331
vtkSmartPointer< vtkImageActor > image3DActor
3D actor
Definition: Slice.h:290
vtkSmartPointer< vtkWindowLevelLookupTable > lut
Common lookup table.
Definition: Slice.h:275
vtkSmartPointer< vtkImageActor > image2DActor
2D actor
Definition: Slice.h:293
vtkSmartPointer< vtkPolyDataMapper > pickPlaneMapper
Mapper of the the pickPlane.
Definition: Slice.h:306