Computer Assisted Medical Intervention Tool Kit  version 5.2
ReorientImage.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 REORIENTIMAGE_H
27 #define REORIENTIMAGE_H
28 
29 // Include Action.h to be able to inherit from Action
30 #include <Action.h>
31 // Include ui_ReorientImage.h to be able to declare an instance of Ui::ReorientImage
32 #include "ui_ReorientImage.h"
33 
35 
36 class vtkTransform;
37 class vtkAnnotatedCubeActor;
38 namespace camitk {
39 class Geometry;
40 class ImageComponent;
41 }
42 
43 class ReorientImage : public camitk::Action {
44  Q_OBJECT
45 
46 public:
49 
51  virtual ~ReorientImage();
52 
54  virtual QWidget* getWidget();
55 
56  void showApplyButton(bool show);
57 
58 public slots:
61 
62  virtual void rcsChanged(const QString index);
63 
64  virtual void modelChanged(bool displayMaleModel);
65 
66 private:
68  void initDialog();
69 
71  void buildGeometries();
72 
73  void buildAxes();
74  void buildCube();
75  void buildTransforms();
76 
77  void initInternalViewer();
78 
79  void setAxesOrientation(const QString orientation);
80 
81  InteractiveGeometryViewer* internalViewer;
82 
84  ApplyStatus process(camitk::ImageComponent* image);
85 
87  Ui::ReorientImage ui;
88 
90  QFrame* dialog;
91 
93  vtkSmartPointer<vtkAxesActor> axes;
94 
96  vtkSmartPointer<vtkAnnotatedCubeActor> annotatedCube;
97 
98  vtkSmartPointer<vtkTransform> orientationTransform;
99  // The cube should not rotate, just translate...
100  vtkSmartPointer<vtkTransform> orientationCubeTransform;
101 
102  vtkSmartPointer<vtkTransform> cubeTransform;
103  vtkSmartPointer<vtkTransform> axesTransform;
104 
105  camitk::Geometry* modelBoundingBox;
106  camitk::Geometry* maleModel;
107  camitk::Geometry* femaleModel;
108 
109  QMap<QChar, QString> lettersMeaning;
110 
111 };
112 
113 #endif // REORIENTIMAGE_H
Interactive 3D viewer.
Definition: InteractiveGeometryViewer.h:56
Definition: ReorientImage.h:43
virtual void modelChanged(bool displayMaleModel)
Definition: ReorientImage.cpp:224
virtual camitk::Action::ApplyStatus apply()
method called when the action is applied
Definition: ReorientImage.cpp:253
virtual void rcsChanged(const QString index)
Definition: ReorientImage.cpp:211
void showApplyButton(bool show)
Definition: ReorientImage.cpp:181
virtual ~ReorientImage()
Destructor.
Definition: ReorientImage.cpp:123
virtual QWidget * getWidget()
this method creates and returns the widget containing the user interface for the action
Definition: ReorientImage.cpp:242
ReorientImage(camitk::ActionExtension *)
the constructor
Definition: ReorientImage.cpp:76
This class describes what is a generic Action extension.
Definition: ActionExtension.h:57
Action class is an abstract class that enables you to build a action (generally on a component).
Definition: Action.h:209
ApplyStatus
describes what happened during the application of an algorithm (i.e. results of the apply method)
Definition: Action.h:225
A 3D representation of a vtkPointSet to be displayed in a InteractiveViewer, this class implements th...
Definition: Geometry.h:126
The manager of the Image Volume data.
Definition: ImageComponent.h:77
Definition: Action.cpp:36