Computer Assisted Medical Intervention Tool Kit  version 5.2
SingleImageComponent.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * $CAMITK_LICENCE_BEGIN$
3  *
4  * CamiTK - Computer Assisted Medical Intervention ToolKit
5  * (c) 2001-2024 Univ. Grenoble Alpes, CNRS, Grenoble INP - UGA, TIMC, 38000 Grenoble, France
6  *
7  * Visit http://camitk.imag.fr for more information
8  *
9  * This file is part of CamiTK.
10  *
11  * CamiTK is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * CamiTK is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  * GNU Lesser General Public License version 3 for more details.
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with CamiTK. If not, see <http://www.gnu.org/licenses/>.
22  *
23  * $CAMITK_LICENCE_END$
24  ****************************************************************************/
25 
26 #ifndef SINGLEIMAGEVOLUMECOMPONENT_H
27 #define SINGLEIMAGEVOLUMECOMPONENT_H
28 
29 
30 // -- Core stuff
31 #include "Component.h"
32 #include "Slice.h"
33 
34 // -- QT stuff classes
35 class QMenu;
36 
37 // -- VTK stuff
38 #include <vtkImageReslice.h>
39 #include <vtkWindowLevelLookupTable.h>
40 
41 // -- VTK stuff classes
42 class vtkImageClip;
43 
44 namespace camitk {
62  Q_OBJECT
63 
65  Q_PROPERTY(bool viewSliceIn3D READ getViewSliceIn3D WRITE setViewSliceIn3D)
66 
67 public:
69  SingleImageComponent(Component* parentComponent, Slice::SliceOrientation, const QString& name, vtkSmartPointer<vtkWindowLevelLookupTable> lut);
70 
72  ~SingleImageComponent() override = default;
73 
75  virtual void pixelPicked(double, double, double) override;
76 
78  virtual void setSelected(const bool, const bool) override;
79 
81  virtual void singleImageSelected(const bool);
82 
84 
92  CAMITK_API_DEPRECATED("Please use getVisibility(\"3D Viewer\") instead") virtual bool getViewSliceIn3D() const;
93 
97  CAMITK_API_DEPRECATED("Please use setVisibility(\"3D Viewer\",bool) instead") virtual void setViewSliceIn3D(bool viewSliceIn3D);
99 
103  virtual void setTransform(vtkSmartPointer<vtkTransform>) override;
104  virtual void resetTransform() override;
105  virtual void translate(double, double, double) override;
106  virtual void rotate(double, double, double) override;
107  virtual void rotateVTK(double, double, double) override;
108  virtual void setTransformTranslation(double, double, double) override;
109  virtual void setTransformTranslationVTK(double, double, double) override;
110  virtual void setTransformRotation(double, double, double) override;
111  virtual void setTransformRotationVTK(double, double, double) override;
113 
115  Slice::SliceOrientation getSliceOrientation();
116 
117 protected:
119  virtual void initRepresentation() override final;
120 
122  Slice::SliceOrientation sliceOrientation;
123 
125  vtkSmartPointer<vtkWindowLevelLookupTable> lut;
126 };
127 
128 }
129 
130 #endif
#define CAMITK_API_DEPRECATED(X)
Definition: CamiTKAPI.h:94
#define CAMITK_API
Definition: CamiTKAPI.h:49
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:303
This Component manages sub-component of the image component seen as a single orientation only (axial ...
Definition: SingleImageComponent.h:61
~SingleImageComponent() override=default
Destructor.
Display a slice (i.e.
Definition: Slice.h:126
SliceOrientation
Common slices orientation: axial, sagittal, coronal axial_neuro.
Definition: Slice.h:151
Viewer is an abstract class that is the base class for all viewers.
Definition: Viewer.h:181
Definition: Action.cpp:36