Computer Assited Medical Intervention Tool Kit  version 4.1
FrameEditor.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 FRAMEEDITOR_H
27 #define FRAMEEDITOR_H
28 
29 #include "Action.h"
30 #include "Component.h"
31 
32 #include <QVector>
33 #include <QLineEdit>
34 
35 #include "ui_FrameEditor.h"
36 
40 class FrameEditor : public camitk::Action {
41  Q_OBJECT
42 
43 public:
46 
48  virtual ~FrameEditor();
49 
51  virtual QWidget* getWidget();
52 
53 public slots:
58  virtual ApplyStatus apply();
59 
60 
61  virtual void displayFrameToggled(bool);
62  virtual void frameSizeChanged(int val);
63 
64  virtual void setParentFrame();
65 
66  virtual void transformationChanged();
67  virtual void setTransformation();
68 
69  virtual void translationChanged();
70  virtual void translate();
71  virtual void setTranslation();
72 
73  virtual void rotationChanged();
74  virtual void rotate();
75  virtual void setRotation();
76 
77 
78 protected:
80 
81 private:
83  void init();
84 
86  Ui::FrameEditor ui;
87 
88  QWidget* myWidget;
89 
91 
92  QVector< QVector<QLineEdit*> > transfromMatrixElements;
93 
94 };
95 
96 #endif // FRAMEEDITOR_H
FrameEditor::ui
Ui::FrameEditor ui
the Qt Gui
Definition: FrameEditor.h:107
FrameEditor::transformationChanged
virtual void transformationChanged()
Definition: FrameEditor.cpp:258
camitk::Action::setFamily
void setFamily(QString family)
the name of the family in which this action is associated
Definition: Action.cpp:128
camitk::Component::getTransform
const vtkSmartPointer< vtkTransform > getTransform() const override
Get the transformation with respect to the parent frame.
Definition: sdk/libraries/core/component/Component.cpp:665
FrameEditor::setTranslation
virtual void setTranslation()
Definition: FrameEditor.cpp:322
camitk::Component::setParentFrame
void setParentFrame(InterfaceFrame *frame, bool keepTransform=true) override
Set the parent frame and update or not its transform during the parent transition.
Definition: sdk/libraries/core/component/Component.cpp:637
FrameEditor::currentComponent
camitk::Component * currentComponent
Definition: FrameEditor.h:111
FrameEditor::getWidget
virtual QWidget * getWidget()
this method creates and returns the widget containing the user interface for the action
Definition: FrameEditor.cpp:146
camitk::Action::SUCCESS
everything went according to plan
Definition: Action.h:245
FrameEditor::setRotation
virtual void setRotation()
Definition: FrameEditor.cpp:355
camitk::Action::ApplyStatus
ApplyStatus
Definition: Action.h:244
camitk::Action::setName
void setName(QString name)
Definition: Action.cpp:112
camitk::InterfaceFrame::rotateVTK
virtual void rotateVTK(double aroundX, double aroundY, double aroundZ)=0
Apply a rotation relative to the current position, using the VTK rotation order (Z,...
camitk::InterfaceFrame::getFrameAxisActor
virtual vtkSmartPointer< vtkAxesActor > getFrameAxisActor()=0
Gives the 3D representation of the frame (based on xyz arrows)
camitk::Action::setComponent
void setComponent(QString component)
the name of the component class that can be used by this action
Definition: Action.cpp:123
FrameEditor
This action allows you to apply a linear transformation (translation,rotation around axes) on the top...
Definition: FrameEditor.h:39
camitk::InterfaceFrame::setFrameVisibility
virtual void setFrameVisibility(Viewer *viewer, bool visible)=0
Set the Component Frame visible for a given viewer.
camitk::Action::getTargets
const ComponentList getTargets() const
the currently selected and valid (regarding the component property) components, for which this action...
Definition: Action.cpp:158
Action.h
FrameEditor::apply
virtual ApplyStatus apply()
Update the component's frame with the translation and rotation parameters of the widget.
Definition: FrameEditor.cpp:373
camitk::Action::addTag
void addTag(QString tag)
add a tag to the tags list of this action
Definition: Action.cpp:133
Log.h
camitk::Action
Action class is an abstract class that enables you to build a action (generally on a component)....
Definition: Action.h:228
camitk::InterfaceFrame::setTransformRotationVTK
virtual void setTransformRotationVTK(double aroundX, double aroundY, double aroundZ)=0
Set the rotation part of the 3D space transformation of the current frame.
FrameEditor::setParentFrame
virtual void setParentFrame()
Definition: FrameEditor.cpp:236
FrameEditor.h
camitk::InterfaceFrame::setTransformTranslationVTK
virtual void setTransformTranslationVTK(double x, double y, double z)=0
Set the translation part of the 3D space transformation of the current frame.
FrameEditor::frameSizeChanged
virtual void frameSizeChanged(int val)
Definition: FrameEditor.cpp:227
camitk::Action::setDescription
void setDescription(QString description)
the description of the action
Definition: Action.cpp:118
camitk::Component::getName
QString getName() const override
get the name to be displayed
Definition: sdk/libraries/core/component/Component.h:848
camitk::InterfaceFrame::getFrameVisibility
virtual bool getFrameVisibility(Viewer *viewer) const =0
Get the Component Frame visibility for a given viewer.
camitk::InterfaceFrame
This class describes what are the methods to implement in order to manage a Component position in spa...
Definition: InterfaceFrame.h:63
camitk::Component::setTransformRotation
resetTransform double double setTransformRotation
Definition: sdk/libraries/core/component/Component.h:745
camitk::ComponentList
QList< Component * > ComponentList
A list of Component.
Definition: CamiTKAPI.h:88
camitk::InterfaceFrame::getParentFrame
virtual InterfaceFrame * getParentFrame() const =0
Get the parent frame.
FrameEditor::init
void init()
initialize the dialog
Definition: FrameEditor.cpp:51
FrameEditor::initializeDialogWithCurrentComponent
virtual void initializeDialogWithCurrentComponent()
Definition: FrameEditor.cpp:159
camitk::ActionExtension
This class describes what is a generic Action extension. To add a ActionExtension to CamiTK core,...
Definition: ActionExtension.h:80
FrameEditor::setTransformation
virtual void setTransformation()
Definition: FrameEditor.cpp:291
CAMITK_TRACE
#define CAMITK_TRACE(MSG)
Log for trace verbosity (the most verbose one, should be used for bug report) The msg will appear onl...
Definition: Log.h:251
camitk::Component::rotate
resetTransform rotate
Definition: sdk/libraries/core/component/Component.h:737
InteractiveViewer.h
camitk::InterfaceFrame::translate
virtual void translate(double x, double y, double z)=0
Apply a translation relative to the current position.
FrameEditor::myWidget
QWidget * myWidget
Definition: FrameEditor.h:109
FrameEditor::rotate
virtual void rotate()
Definition: FrameEditor.cpp:337
FrameEditor::FrameEditor
FrameEditor(camitk::ActionExtension *)
the constructor
Definition: FrameEditor.cpp:35
FrameEditor::transfromMatrixElements
QVector< QVector< QLineEdit * > > transfromMatrixElements
Definition: FrameEditor.h:113
camitk::InterfaceFrame::setTransform
virtual void setTransform(vtkSmartPointer< vtkTransform > transform)=0
Set the current input frame position (according to its parent Frame)
FrameEditor::translate
virtual void translate()
Definition: FrameEditor.cpp:312
FrameEditor::translationChanged
virtual void translationChanged()
Definition: FrameEditor.cpp:307
FrameEditor::~FrameEditor
virtual ~FrameEditor()
Destructor.
Definition: FrameEditor.cpp:139
FrameEditor::displayFrameToggled
virtual void displayFrameToggled(bool)
Definition: FrameEditor.cpp:217
FrameEditor::rotationChanged
virtual void rotationChanged()
Definition: FrameEditor.cpp:332
camitk::Component
A Component represents something that could be included in the explorer view, the interactive 3D view...
Definition: sdk/libraries/core/component/Component.h:297
camitk
Definition: Action.cpp:36