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>
160 Slice(vtkSmartPointer<vtkImageData> volume, SliceOrientation AXIAL_ORIENTATION, vtkSmartPointer<vtkWindowLevelLookupTable> lookupTable =
nullptr);
170 void setOriginalVolume(vtkSmartPointer<vtkImageData> img)
override final;
173 vtkSmartPointer<vtkImageActor> get2DImageActor()
const override;
176 vtkSmartPointer<vtkImageActor> get3DImageActor()
const override;
179 vtkSmartPointer<vtkActor> getPickPlaneActor()
const override;
182 vtkSmartPointer<vtkActor> getPixelActor()
override;
187 void pixelPicked(
double,
double,
double)
override;
190 void updatePickPlane() override final;
193 int getNumberOfSlices() const override final;
196 int getSlice() const override;
202 void setSlice(
int s) override final;
205 void setSlice(
double x,
double y,
double z) override;
210 int getNumberOfColors() const override;
213 void setPixelRealPosition(
double,
double,
double) override;
221 virtual
void setArbitraryTransform(vtkSmartPointer<vtkTransform>) override;
224 vtkSmartPointer<vtkImageData> getImageData() const override;
239 vtkSmartPointer<vtkProp> getProp(const QString&) override;
242 unsigned int getNumberOfProp() const override;
245 vtkSmartPointer<vtkProp> getProp(
unsigned int) override;
250 bool addProp(const QString&, vtkSmartPointer<vtkProp>) override;
255 bool removeProp(const QString&) override;
275 void reslicedToVolumeCoords(const
double* ijk,
double* xyz);
280 void volumeToReslicedCoords(const
double* xyz,
double* ijk);
296 vtkSmartPointer<vtkWindowLevelLookupTable>
lut;
#define CAMITK_API
Definition CamiTKAPI.h:66
This class describes what are the methods to implement for a BitMap.
Definition InterfaceBitMap.h:68
Display a slice (i.e.
Definition Slice.h:124
QMap< QString, vtkSmartPointer< vtkProp > > extraProp
The additional map for prop.
Definition Slice.h:363
double originalSpacing[3]
Voxel size of the original image volume.
Definition Slice.h:299
vtkSmartPointer< vtkUnstructuredGrid > pixelActorPointSet
the pixel actor unstructured grid
Definition Slice.h:355
double originalSize[3]
Real size (originalDimension * originalSpacing in x, y and z) of the original image.
Definition Slice.h:302
SliceOrientation sliceOrientation
Direction of the reslice.
Definition Slice.h:287
vtkSmartPointer< vtkActor > pixelActor
Actor representing a pixel, displayed over the image.
Definition Slice.h:352
void updatePixelActor(double x, double y, double z)
Update the pixel actor position according to the specified pixel picked by the user i....
Definition Slice.cpp:526
int currentSliceIndex
Keep track of the slice number.
Definition Slice.h:293
SliceOrientation
Common slices orientation: axial, sagittal, coronal axial_neuro.
Definition Slice.h:149
@ AXIAL
Definition Slice.h:150
@ AXIAL_NEURO
Definition Slice.h:153
@ CORONAL
Definition Slice.h:151
@ SAGITTAL
Definition Slice.h:152
@ ARBITRARY
Definition Slice.h:154
vtkSmartPointer< vtkUnstructuredGrid > pickPlaneActorPointSet
the pick plane actor unstructured grid
Definition Slice.h:349
vtkSmartPointer< vtkWindowLevelLookupTable > lut
Common lookup table.
Definition Slice.h:296
void initPixelActor()
Init the pixel actor for pixel picking.
Definition Slice.cpp:414
vtkSmartPointer< vtkActor > pickPlaneActor
Actor representing the pickPlane.
Definition Slice.h:346
void initPickPlaneActor()
init the pick plane actor
Definition Slice.cpp:328
vtkSmartPointer< vtkImageActor > image3DActor
3D actor
Definition Slice.h:305
vtkSmartPointer< vtkImageData > originalVolume
Smart pointer to the original volume to reslice (input of the vtk pipeline).
Definition Slice.h:290
vtkSmartPointer< vtkImageActor > image2DActor
2D actor
Definition Slice.h:308
vtkSmartPointer< vtkImageReslice > image2DReslicer
The image reslicer computes the arbitrary slice pixels.
Definition Slice.h:315
Slice(vtkSmartPointer< vtkImageData > volume, SliceOrientation AXIAL_ORIENTATION, vtkSmartPointer< vtkWindowLevelLookupTable > lookupTable=nullptr)
Definition Slice.cpp:47