26 #ifndef IMAGE_COMPONENT_H
27 #define IMAGE_COMPONENT_H
31 #include "Component.h"
35 #include <vtkPolyData.h>
36 #include <vtkSmartPointer.h>
37 #include <vtkImageData.h>
38 #include <vtkTransform.h>
39 #include <vtkImageFlip.h>
40 #include <vtkWindowLevelLookupTable.h>
41 #include <vtkMatrix4x4.h>
49 class QStandardItemModel;
56 class SingleImageComponent;
57 class ArbitrarySingleImageComponent;
101 void setSelected(
const bool b,
const bool recursive =
false)
override;
112 CAMITK_API_DEPRECATED(
"Please use setVisibility(QString viewerName, bool) instead")
virtual void setVisibility(
Viewer*,
bool)
override;
116 virtual void setVisibility(QString,
bool)
override;
119 QString getImageName()
const;
120 void setImageName(
const QString&);
124 return originalImageData;
132 vtkSmartPointer<vtkImageData> getImageDataWithFrameTransform();
136 return initialOrientation;
143 void pixelPicked(
double x,
double y,
double z)
override;
147 void getLastPixelPicked(
int* x,
int* y,
int* z);
151 void getLastPointPickedImageCoords(
double* x,
double* y,
double* z);
155 void getLastPointPickedWorldCoords(
double* x,
double* y,
double* z);
162 int getNumberOfColors()
const override;
165 double getMinColor()
const;
168 double getMaxColor()
const;
173 int getActualNumberOfColors()
const;
176 double getActualMinColor()
const;
179 double getActualMaxColor()
const;
182 int getNumberOfSlices()
const override;
185 virtual void setLut(vtkSmartPointer<vtkWindowLevelLookupTable> lookupTable);
188 virtual vtkSmartPointer<vtkWindowLevelLookupTable> getLut();
191 virtual const vtkSmartPointer<vtkWindowLevelLookupTable> getLut()
const;
221 void updateProperty(QString, QVariant)
override;
224 unsigned int getNumberOfPropertyWidget()
override;
227 QWidget* getPropertyWidgetAt(
unsigned int i)
override;
231 return rotationMatrix;
240 virtual QVariant toVariant()
const override;
243 virtual void fromVariant(
const QVariant&)
override;
256 void setImageData(vtkSmartPointer<vtkImageData> anImageData,
259 vtkSmartPointer<vtkMatrix4x4> initialTransformMatrix =
nullptr);
283 void initImageProperties();
286 void initRepresentation()
override {}
289 void initLookupTable();
292 void buildImageComponents();
295 void updateImageComponents();
302 void update3DViewer();
306 vtkSmartPointer<vtkPolyData> getBoundingBox();
309 vtkSmartPointer<vtkImageData> originalImageData;
312 SingleImageComponent* axialSlices;
315 SingleImageComponent* sagittalSlices;
318 SingleImageComponent* coronalSlices;
321 ArbitrarySingleImageComponent* arbitrarySlices;
325 MeshComponent* volumeRenderingChild;
328 vtkSmartPointer<vtkWindowLevelLookupTable> lut;
331 double currentPixelPicked[3];
337 QTableView* selectionView;
340 QStandardItemModel* model;
348 vtkSmartPointer<vtkTransform> initialImageDataTransform;
354 vtkSmartPointer<vtkTransform> initialFrameTransform;
358 vtkSmartPointer<vtkMatrix4x4> rotationMatrix;
#define CAMITK_API_DEPRECATED(X)
Definition: CamiTKAPI.h:94
#define CAMITK_API
Definition: CamiTKAPI.h:49
This Component manages the specific case of arbitrary orientation of a sub-component of the image com...
Definition: ArbitrarySingleImageComponent.h:65
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:303
The manager of the Image Volume data.
Definition: ImageComponent.h:77
const vtkSmartPointer< vtkMatrix4x4 > getRotationMatrix()
Definition: ImageComponent.h:230
ImageOrientationHelper::PossibleImageOrientations getInitialOrientation() const
Get the initial image orientation.
Definition: ImageComponent.h:135
vtkSmartPointer< vtkImageData > getImageData() const override
get the image volume managed by this Component
Definition: ImageComponent.h:123
PossibleImageOrientations
For each axis (x, y or z), 6 possibilities:
Definition: ImageOrientationHelper.h:52
@ RAI
Direct Orientations X: Right to Left, Y: Anterior to Posterior, Z: Inferior to Superiror.
Definition: ImageOrientationHelper.h:55
Basic component to manage any kind of mesh.
Definition: MeshComponent.h:53
This Component manages sub-component of the image component seen as a single orientation only (axial ...
Definition: SingleImageComponent.h:61
Viewer is an abstract class that is the base class for all viewers.
Definition: Viewer.h:181
Definition: Action.cpp:36
void refresh()
refresh the display