26 #ifndef CANONICAL_SLICE_H
27 #define CANONICAL_SLICE_H
35 #include <CamiTKDisableWarnings>
36 #include <vtkWindowLevelLookupTable.h>
38 #include <vtkImageActor.h>
39 #include <CamiTKReEnableWarnings>
41 #include <vtkImageData.h>
42 #include <vtkTransform.h>
43 #include <vtkUnstructuredGrid.h>
44 #include <vtkImageReslice.h>
162 Slice(vtkSmartPointer<vtkImageData> volume, SliceOrientation AXIAL_ORIENTATION, vtkSmartPointer<vtkWindowLevelLookupTable> lookupTable =
nullptr);
172 void setOriginalVolume(vtkSmartPointer<vtkImageData> img)
override final;
177 void setImageWorldTransform(vtkSmartPointer<vtkTransform>)
override;
180 vtkSmartPointer<vtkImageActor> get2DImageActor()
const override;
183 vtkSmartPointer<vtkImageActor> get3DImageActor()
const override;
186 vtkSmartPointer<vtkActor> getPickPlaneActor()
const override;
189 vtkSmartPointer<vtkActor> getPixelActor()
override;
194 void pixelPicked(
double,
double,
double)
override;
197 void updatePickPlane() override final;
200 int getNumberOfSlices() const override final;
203 int getSlice() const override;
209 void setSlice(
int s) override final;
212 void setSlice(
double x,
double y,
double z) override;
217 int getNumberOfColors() const override;
220 void setPixelRealPosition(
double,
double,
double) override;
228 virtual
void setArbitraryTransform(vtkSmartPointer<vtkTransform>) override;
231 vtkSmartPointer<vtkImageData> getImageData() const override;
246 vtkSmartPointer<vtkProp> getProp(const QString&) override;
249 unsigned int getNumberOfProp() const override;
252 vtkSmartPointer<vtkProp> getProp(
unsigned int) override;
257 bool addProp(const QString&, vtkSmartPointer<vtkProp>) override;
282 void reslicedToVolumeCoords(const
double* ijk,
double* xyz);
287 void volumeToReslicedCoords(const
double* xyz,
double* ijk);
297 vtkSmartPointer<vtkImageData> originalVolume;
300 int currentSliceIndex;
303 vtkSmartPointer<vtkWindowLevelLookupTable> lut;
306 double originalSpacing[3];
309 double originalSize[3];
312 vtkSmartPointer<vtkImageActor> image3DActor;
315 vtkSmartPointer<vtkImageActor> image2DActor;
322 vtkSmartPointer<vtkImageReslice> image2DReslicer;
330 void initPickPlaneActor();
335 void initPixelActor();
347 void updatePixelActor(
double x,
double y,
double z);
350 void updatePixelActor();
353 vtkSmartPointer<vtkActor> pickPlaneActor;
356 vtkSmartPointer<vtkUnstructuredGrid> pickPlaneActorPointSet;
359 vtkSmartPointer<vtkActor> pixelActor;
362 vtkSmartPointer<vtkUnstructuredGrid> pixelActorPointSet;
370 QMap<QString, vtkSmartPointer<vtkProp> > extraProp;
#define CAMITK_API
Definition: CamiTKAPI.h:49
This class describes what are the methods to implement for a BitMap.
Definition: InterfaceBitMap.h:68
Display a slice (i.e.
Definition: Slice.h:126
SliceOrientation
Common slices orientation: axial, sagittal, coronal axial_neuro.
Definition: Slice.h:151
@ AXIAL
Definition: Slice.h:152
@ AXIAL_NEURO
Definition: Slice.h:155
@ CORONAL
Definition: Slice.h:153
@ SAGITTAL
Definition: Slice.h:154
Definition: Action.cpp:36
void removeProp(vtkSmartPointer< vtkProp > p, bool refresh=false)
remove the given vtkProp (e.g.