Computer Assisted Medical Intervention Tool Kit version 6.0
 
Loading...
Searching...
No Matches
TransformationExplorer.h
Go to the documentation of this file.
1/*****************************************************************************
2 * $CAMITK_LICENCE_BEGIN$
3 *
4 * CamiTK - Computer Assisted Medical Intervention ToolKit
5 * (c) 2001-2025 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
27#ifndef TRANSFORMATIONEXPLORER_H
28#define TRANSFORMATIONEXPLORER_H
29
31
32// -- Core stuff
33#include <Viewer.h>
34
35// Qt
36#include <QTreeWidget>
37#include <QPushButton>
38#include <QVBoxLayout>
39
40namespace camitk {
41// -- Core stuff classes
42class FrameOfReference;
43class Transformation;
44class GraphDisplayWidget;
45}
46
60 Q_OBJECT
61
62public:
63
65 Q_INVOKABLE TransformationExplorer(QString);
66
69
74 void refresh(Viewer* whoIsAsking = nullptr) override;
75
77 QWidget* getWidget() override;
79
80signals:
83 void framesUpdated(QVector<camitk::FrameOfReference*>);
84
87 void directTransformationsUpdated(QVector<camitk::Transformation*>);
88
92
96
97private:
98 // The main widget
99 QFrame* mainWidget;
100
101 // Keep the list of frames and transformations to refresh them only if there is a change
102 QVector<camitk::FrameOfReference*> currentFrames;
103 QVector<camitk::Transformation*> currentDirectTransformations;
104
107
111 void addTransformation(const camitk::Transformation* tr, bool addToGraphDisplay = true);
112
116 void getTransformationMenu(const QPoint& pos);
117
121 void getFrameMenu(const QPoint& pos);
122
126 void addFrame(camitk::FrameOfReference* frame, QString componentsNames, QString viewersNames, bool addToGraphDisplay = true);
127
128 // Set the selection in the tree views (called when the graph display signals are triggered)
129 void setSelectedFrame(const camitk::FrameOfReference*);
130 void setSelectedTransformation(const camitk::Transformation*);
131
133 QString circledNumber(int n);
134
136 QTreeWidget* frameTree;
137 QTreeWidget* transformationTree;
139
140 // Graphical view of the transformation graph
141 camitk::GraphDisplayWidget* transformationGraphDisplay;
142};
143
144#endif
#define TRANSFORMATIONEXPLORER_API
Definition TransformationExplorerAPI.h:53
Show a simplified version for the current TransformationManager state with existing transformations a...
Definition TransformationExplorer.h:59
void directTransformationsUpdated(QVector< camitk::Transformation * >)
signal emitted when the list of direct Transformations was updated Should be replaced by signals from...
void framesUpdated(QVector< camitk::FrameOfReference * >)
signal emitted when the list of Frames was updated Should be replaced by signals from TransformationM...
void currentFrameChanged(const camitk::FrameOfReference *)
signal emitted when the currently selected frame was changed (the user clicked on a frame in the fram...
void currentTransformationChanged(const camitk::Transformation *)
signal emitted when the currently selected transformation was changed (user clicked on a transformati...
FrameOfReference is only a label for an abstract coordinate system.
Definition FrameOfReference.h:71
GraphDisplayWidget is used to manage a Widget to display a graph with nodes and links onto a 2D canva...
Definition GraphDisplayWidget.h:51
Transformation represents a geometrical transformation between two FrameOfReferences.
Definition Transformation.h:83
Viewer is an abstract class that is the base class for all viewers.
Definition Viewer.h:182
virtual QWidget * getWidget()=0
get the viewer widget.
virtual void refresh(Viewer *whoIsAsking=nullptr)=0
refresh the view (can be interesting to know which other viewer is calling this)
Definition Action.cpp:40