Computer Assited Medical Intervention Tool Kit  version 5.0
AnglesAndTranslationAction.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 #ifndef ANGLESANDTRANSLATIONACTION_H
26 #define ANGLESANDTRANSLATIONACTION_H
27 
28 // CamiTK stuff
29 #include <QObject>
30 #include <Action.h>
32 #include <MedicalImageViewer.h>
33 
34 #include "ArbitrarySliceAPI.h"
35 
43 
44  Q_OBJECT
45 
46 public:
47 
50 
52  virtual ~AnglesAndTranslationAction();
53 
55  virtual QWidget* getWidget();
56 
58  virtual bool event(QEvent* e);
59 
61  void resetTransform();
62 
63 public slots:
68  return SUCCESS;
69  }
70 
71  // Update the translation and the corresponding slider whenever the arbitrary slice viewer slider has changed
72  void updateTranslation();
73 
74 private:
77  void update();
78 
80  camitk::ArbitrarySingleImageComponent* currentImageComp;
81 
83  bool blockEvent;
84 };
85 
86 #endif // ANGLESANDTRANSLATIONACTION_H
87 
AnglesAndTranslationAction::currentImageComp
camitk::ArbitrarySingleImageComponent * currentImageComp
currently controled image
Definition: AnglesAndTranslationAction.h:103
AnglesAndTranslationAction
This action simply display the widget allowing the user to select an angle to orientate the arbitrary...
Definition: AnglesAndTranslationAction.h:42
camitk::ArbitrarySingleImageComponent::setTransformTranslation
virtual void setTransformTranslation(double, double, double) override final
set the arbitrary slice translation inside the volume between 0 and 1 (first two parameters are ignor...
Definition: ArbitrarySingleImageComponent.cpp:196
camitk::Action::setFamily
void setFamily(QString family)
the name of the family in which this action is associated
Definition: Action.cpp:136
ARBITRARY_SLICE_API
#define ARBITRARY_SLICE_API
Definition: ArbitrarySliceAPI.h:8
AnglesAndTranslationAction::blockEvent
bool blockEvent
block property changed event (temporarily)
Definition: AnglesAndTranslationAction.h:106
MedicalImageViewer::LayoutVisibility
LayoutVisibility
Definition: MedicalImageViewer.h:87
AnglesAndTranslationAction::resetTransform
void resetTransform()
reset transform to identity
Definition: AnglesAndTranslationAction.cpp:138
camitk::Action::SUCCESS
@ SUCCESS
everything went according to plan
Definition: Action.h:248
MedicalImageViewer
All-in-one medical image viewer.
Definition: MedicalImageViewer.h:59
camitk::Property::setEnumTypeName
void setEnumTypeName(QString)
if the property's type is an enum, set the name of the registered Qt Enum.
Definition: Property.cpp:108
camitk::Action::ApplyStatus
ApplyStatus
Definition: Action.h:247
camitk::Action::setName
void setName(QString name)
Definition: Action.cpp:120
camitk::ArbitrarySingleImageComponent
This Component manages the specific case of arbitrary orientation of a sub-component of the image com...
Definition: ArbitrarySingleImageComponent.h:88
camitk::Action::setAutoUpdateProperties
void setAutoUpdateProperties(bool)
are the properties to be udpated every time the user makes a change in the widget (default is false)?
Definition: Action.cpp:426
camitk::Action::setComponent
void setComponent(QString component)
the name of the component class that can be used by this action
Definition: Action.cpp:131
camitk::Action::actionWidget
QWidget * actionWidget
the action widget
Definition: Action.h:480
camitk::ImageComponent
The manager of the Image Volume data. An image volume data has no concrete 3D representation,...
Definition: ImageComponent.h:77
camitk::Action::getTargets
const ComponentList getTargets() const
the currently selected and valid (regarding the component property) components, for which this action...
Definition: Action.cpp:166
Action.h
camitk::Action::setEmbedded
void setEmbedded(bool isEmbedded)
set the embedded property (an action is embedded by default, unless specified otherwise by explicitly...
Definition: Action.cpp:146
AnglesAndTranslationWidget.h
AnglesAndTranslationAction::~AnglesAndTranslationAction
virtual ~AnglesAndTranslationAction()
Default Destructor.
Definition: AnglesAndTranslationAction.cpp:90
camitk::Property
This class describes a property that can be used in components and actions or any class that needs to...
Definition: Property.h:303
ArbitrarySliceAPI.h
camitk::Action::addTag
void addTag(QString tag)
add a tag to the tags list of this action
Definition: Action.cpp:141
camitk::Action
Action class is an abstract class that enables you to build a action (generally on a component)....
Definition: Action.h:231
ArbitrarySingleImageComponent.h
MedicalImageViewer::VIEWER_ARBITRARY
@ VIEWER_ARBITRARY
Only the arbitrary InteractiveViewer are visible.
Definition: MedicalImageViewer.h:93
Property.h
AnglesAndTranslationAction::getWidget
virtual QWidget * getWidget()
Return the arbitrary slice angles setter widget.
Definition: AnglesAndTranslationAction.cpp:95
camitk::Property::setAttribute
void setAttribute(const QString &attribute, const QVariant &value)
Set a given property for this attribute.
Definition: Property.cpp:183
camitk::Action::apply
virtual camitk::Action::ApplyStatus apply()=0
This method is called when the action has to be applied on the target list (get the target lists usin...
AnglesAndTranslationWidget
This class describes the QWidget that allows user to change the X,Y ans Z angle of the arbitrary slic...
Definition: AnglesAndTranslationWidget.h:46
camitk::ArbitrarySingleImageComponent::resetTransform
virtual void resetTransform() override final
reset the transformation to the image component parent so that the frame of the arbitrary slice is in...
Definition: ArbitrarySingleImageComponent.cpp:133
MedicalImageViewer.h
AnglesAndTranslationAction.h
camitk::Action::setDescription
void setDescription(QString description)
the description of the action
Definition: Action.cpp:126
AnglesAndTranslationAction::update
void update()
update action's parameter using the current image state + update widget GUI
Definition: AnglesAndTranslationAction.cpp:115
camitk::ArbitrarySingleImageComponent::setTransformRotation
virtual void setTransformRotation(double, double, double) override final
rotate of the given angles around the center of the frame/arbitrary slice
Definition: ArbitrarySingleImageComponent.cpp:139
AnglesAndTranslationAction::event
virtual bool event(QEvent *e)
manage change in the action parameters (angles and slice number)
Definition: AnglesAndTranslationAction.cpp:153
camitk::Component::setVisibility
virtual void setVisibility(QString, bool)
set the visibility inside the viewer of the given name (the viewer needs to be a registered viewer)
Definition: sdk/libraries/core/component/Component.cpp:224
camitk::Action::addParameter
virtual bool addParameter(Property *)
Add a new parameter to the action, using the CamiTK property class.
Definition: Action.cpp:440
camitk::ActionExtension
This class describes what is a generic Action extension. To add a ActionExtension to CamiTK core,...
Definition: ActionExtension.h:80
MedicalImageViewer::setVisibleViewer
void setVisibleViewer(LayoutVisibility)
called to change the layout, i.e. which viewer is visible
Definition: MedicalImageViewer.cpp:244
camitk::ArbitrarySingleImageComponent::getTranslationInVolume
virtual double getTranslationInVolume()
Get the current translation relatively to the volume 0.0 means that the center of the slice is at the...
Definition: ArbitrarySingleImageComponent.cpp:288
AnglesAndTranslationAction::AnglesAndTranslationAction
AnglesAndTranslationAction(camitk::ActionExtension *)
Default Constructor.
Definition: AnglesAndTranslationAction.cpp:41
camitk::Action::getWidget
virtual QWidget * getWidget()
This method has to be redefined in your Action only if:
Definition: Action.cpp:185
AnglesAndTranslationAction::updateTranslation
void updateTranslation()
Definition: AnglesAndTranslationAction.cpp:191
camitk::Component::refresh
virtual void refresh()
refresh all the viewer that are currently displaying this Component At the end the InterfaceNode modi...
Definition: sdk/libraries/core/component/Component.cpp:286
ImageComponent.h
Application.h
camitk
Definition: Action.cpp:35