Computer Assited Medical Intervention Tool Kit  version 4.1
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-2018 Univ. Grenoble Alpes, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
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 
34 class vtkTransform;
35 class vtkAnnotatedCubeActor;
36 namespace camitk {
37 class Geometry;
38 class ImageComponent;
39 class InteractiveViewer;
40 }
41 
42 class ReorientImage : public camitk::Action {
43  Q_OBJECT
44 
45 public:
48 
50  virtual ~ReorientImage();
51 
53  virtual QWidget* getWidget();
54 
55  void showApplyButton(bool show);
56 
57 public slots:
59  virtual ApplyStatus apply();
60 
61  virtual void rcsChanged(const QString index);
62 
63  virtual void modelChanged(bool displayMaleModel);
64 
65 private:
67  void initDialog();
68 
70  void buildGeometries();
71 
72  void buildAxes();
73  void buildCube();
74  void buildTransforms();
75 
76  void initInternalViewer();
77 
78  void setAxesOrientation(const QString orientation);
79 
81 
83  ApplyStatus process(camitk::ImageComponent* image);
84 
86  Ui::ReorientImage ui;
87 
89  QDialog* dialog;
90 
92  vtkSmartPointer<vtkAxesActor> axes;
93 
95  vtkSmartPointer<vtkAnnotatedCubeActor> annotatedCube;
96 
97  vtkSmartPointer<vtkTransform> orientationTransform;
98  // The cube should not rotate, just translate...
99  vtkSmartPointer<vtkTransform> orientationCubeTransform;
100 
101  vtkSmartPointer<vtkTransform> cubeTransform;
102  vtkSmartPointer<vtkTransform> axesTransform;
103 
107 
108 
109  QMap<QChar, QString> lettersMeaning;
110 
111 // camitk::ImageComponent * img;
112 
113 };
114 
115 #endif // REORIENTIMAGE_H
vtkSmartPointer< vtkTransform > cubeTransform
Definition: ReorientImage.h:101
camitk::Geometry * maleModel
Definition: ReorientImage.h:105
InteractiveViewer is used to view 3D objects and slices (anything that provides either a InterfaceBit...
Definition: InteractiveViewer.h:140
QMap< QChar, QString > lettersMeaning
Definition: ReorientImage.h:109
vtkSmartPointer< vtkTransform > orientationTransform
Definition: ReorientImage.h:97
Action class is an abstract class that enables you to build a action (generally on a component)...
Definition: Action.h:207
Definition: ReorientImage.h:42
Definition: Action.cpp:36
vtkSmartPointer< vtkTransform > axesTransform
Definition: ReorientImage.h:102
This class describes what is a generic Action extension.
Definition: ActionExtension.h:59
vtkSmartPointer< vtkTransform > orientationCubeTransform
Definition: ReorientImage.h:99
The manager of the Image Volume data.
Definition: ImageComponent.h:73
vtkSmartPointer< vtkAxesActor > axes
axes actor
Definition: ReorientImage.h:92
QDialog * dialog
the dialog
Definition: ReorientImage.h:89
camitk::InteractiveViewer * internalViewer
Definition: ReorientImage.h:80
ApplyStatus
describes what happened during the application of an algorithm (i.e. results of the apply method) ...
Definition: Action.h:223
Ui::ReorientImage ui
the Qt Gui
Definition: ReorientImage.h:86
vtkSmartPointer< vtkAnnotatedCubeActor > annotatedCube
annotated cube actor
Definition: ReorientImage.h:95
A 3D representation of a vtkPointSet to be displayed in a InteractiveViewer, this class implements th...
Definition: Geometry.h:126
camitk::Geometry * modelBoundingBox
Definition: ReorientImage.h:104
camitk::Geometry * femaleModel
Definition: ReorientImage.h:106