Computer Assited Medical Intervention Tool Kit  version 5.0
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-2021 Univ. Grenoble Alpes, CNRS, Grenoble INP, 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 
82 
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 
108 
109  QMap<QChar, QString> lettersMeaning;
110 
111 };
112 
113 #endif // REORIENTIMAGE_H
Interactive 3D viewer.
Definition: InteractiveGeometryViewer.h:56
Definition: ReorientImage.h:43
QFrame * dialog
the dialog
Definition: ReorientImage.h:90
vtkSmartPointer< vtkAnnotatedCubeActor > annotatedCube
annotated cube actor
Definition: ReorientImage.h:96
Ui::ReorientImage ui
the Qt Gui
Definition: ReorientImage.h:87
camitk::Geometry * maleModel
Definition: ReorientImage.h:106
vtkSmartPointer< vtkTransform > cubeTransform
Definition: ReorientImage.h:102
virtual void modelChanged(bool displayMaleModel)
Definition: ReorientImage.cpp:224
void buildGeometries()
Build Geometries.
Definition: ReorientImage.cpp:455
QMap< QChar, QString > lettersMeaning
Definition: ReorientImage.h:109
InteractiveGeometryViewer * internalViewer
Definition: ReorientImage.h:81
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
vtkSmartPointer< vtkAxesActor > axes
axes actor
Definition: ReorientImage.h:93
vtkSmartPointer< vtkTransform > orientationCubeTransform
Definition: ReorientImage.h:100
ApplyStatus process(camitk::ImageComponent *image)
Actually perform the image transformation.
Definition: ReorientImage.cpp:266
vtkSmartPointer< vtkTransform > axesTransform
Definition: ReorientImage.h:103
virtual ~ReorientImage()
Destructor.
Definition: ReorientImage.cpp:123
void buildAxes()
Definition: ReorientImage.cpp:372
camitk::Geometry * modelBoundingBox
Definition: ReorientImage.h:105
virtual QWidget * getWidget()
this method creates and returns the widget containing the user interface for the action
Definition: ReorientImage.cpp:242
void initInternalViewer()
Definition: ReorientImage.cpp:186
void initDialog()
initialize the dialog
Definition: ReorientImage.cpp:135
vtkSmartPointer< vtkTransform > orientationTransform
Definition: ReorientImage.h:98
void setAxesOrientation(const QString orientation)
Definition: ReorientImage.cpp:512
camitk::Geometry * femaleModel
Definition: ReorientImage.h:107
void buildCube()
Definition: ReorientImage.cpp:410
ReorientImage(camitk::ActionExtension *)
the constructor
Definition: ReorientImage.cpp:76
void buildTransforms()
Definition: ReorientImage.cpp:489
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:208
ApplyStatus
describes what happened during the application of an algorithm (i.e. results of the apply method)
Definition: Action.h:224
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:35