Computer Assited Medical Intervention Tool Kit  version 5.0
VolumeRenderingAction.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 VOLUMERENDERINGACTION_H
26 #define VOLUMERENDERINGACTION_H
27 
28 #include <QObject>
29 #include <Action.h>
30 
31 #include <ImageComponent.h>
32 
33 #include "VolumeRenderingWidget.h"
34 
45  Q_OBJECT
46 
47 public:
50 
52  virtual ~VolumeRenderingAction() = default;
53 
55  void createVolumeRendering();
56 
58  QAction* getQAction(camitk::Component* target = nullptr) override;
59 
60 public slots:
66  virtual camitk::Action::ApplyStatus apply() override;
67 
68  // Returns NULL: no permanent widget for this action. The GUI is run shown a one-shot dialog in apply
69  // A special widget will be displaied to edit colors.
70  virtual QWidget* getWidget() override;
71 
72 private:
73 
76 
79  QString volumeName;
80 
83 
84 };
85 #endif // VOLUMERENDERINGACTION_H
VolumeRenderingWidget::getSpecular
double getSpecular()
Definition: VolumeRenderingWidget.cpp:302
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:824
CAMITK_WARNING
#define CAMITK_WARNING(MSG)
Log for warning verbosity (the most common one) Will appear by default.
Definition: Log.h:266
VolumeRenderingAction::createVolumeRendering
void createVolumeRendering()
create the volume rendering component actors (remove previous one if existed)
Definition: VolumeRenderingAction.cpp:164
camitk::Component::getVisibility
virtual bool getVisibility(QString) const
get the visibility inside the viewer of the given name
Definition: sdk/libraries/core/component/Component.cpp:261
VolumeRenderingWidget.h
VolumeRenderingAction::~VolumeRenderingAction
virtual ~VolumeRenderingAction()=default
Default Destructor.
InteractiveGeometryViewer.h
camitk::Component::addProp
bool addProp(const QString &name, vtkSmartPointer< vtkProp > prop) override
insert an additional prop, defining it by its name (default visibility = false)
Definition: sdk/libraries/core/component/Component.h:626
camitk::Action::SUCCESS
@ SUCCESS
everything went according to plan
Definition: Action.h:248
VolumeRenderingAction::myWidget
VolumeRenderingWidget * myWidget
no default widget but a VolumeRenderingWidget displaied when necessary
Definition: VolumeRenderingAction.h:98
camitk::Action::ABORTED
@ ABORTED
the action was aborted before completion
Definition: Action.h:251
camitk::Action::ApplyStatus
ApplyStatus
Definition: Action.h:247
VolumeRenderingAction::getQAction
QAction * getQAction(camitk::Component *target=nullptr) override
Get the corresponding QAction (overriden to update the checked status)
Definition: VolumeRenderingAction.cpp:118
VolumeRenderingAction::getWidget
virtual QWidget * getWidget() override
Definition: VolumeRenderingAction.cpp:94
VolumeRenderingAction::image
camitk::ImageComponent * image
currently managed/selected image;
Definition: VolumeRenderingAction.h:105
camitk::renderer
renderer
The current renderer.
Definition: RendererWidget.cpp:283
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
VolumeRenderingWidget::getOpacityPoints
QMap< int, double > getOpacityPoints()
Definition: VolumeRenderingWidget.cpp:266
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
VolumeRenderingWidget::getAmbient
double getAmbient()
Definition: VolumeRenderingWidget.cpp:282
Log.h
MeshComponent.h
camitk::Action
Action class is an abstract class that enables you to build a action (generally on a component)....
Definition: Action.h:231
Property.h
VolumeRenderingAction::volumeName
QString volumeName
Name given to the Volume rendering actor attached to the Volume Rendering subComponant of a volume im...
Definition: VolumeRenderingAction.h:102
VolumeRenderingAction
This action perform a volume rendering.
Definition: VolumeRenderingAction.h:44
VolumeRenderingAction::apply
virtual camitk::Action::ApplyStatus apply() override
this method is automatically called when the action is triggered.
Definition: VolumeRenderingAction.cpp:140
camitk::Component::getName
QString getName() const override
get the name to be displayed
Definition: sdk/libraries/core/component/Component.h:907
camitk::Component::getProp
vtkSmartPointer< vtkPointSet > vtkSmartPointer< vtkAlgorithmOutput > const RenderingModes vtkSmartPointer< vtkProp > getProp(const QString &param) override
Return the vtkProp (actors, volumes and annotations) corresponding to the given name.
Definition: sdk/libraries/core/component/Component.h:593
camitk::Component::removeProp
bool removeProp(const QString &name) override
remove a given additional prop.
Definition: sdk/libraries/core/component/Component.h:638
VolumeRenderingWidget
The widget allows the user to select the desired parameter for the transfer function.
Definition: VolumeRenderingWidget.h:52
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::ActionExtension
This class describes what is a generic Action extension. To add a ActionExtension to CamiTK core,...
Definition: ActionExtension.h:80
camitk::ImageComponent::getImageData
vtkSmartPointer< vtkImageData > getImageData() const override
get the image volume managed by this Component
Definition: ImageComponent.h:123
VolumeRenderingWidget::updateUI
void updateUI(QString name, bool existVR)
update the UI using the given name (current image name) and its visibility existVR should be true if ...
Definition: VolumeRenderingWidget.cpp:87
camitk::ImageComponent::getVolumeRenderingChild
MeshComponent * getVolumeRenderingChild()
Returns the MeshComponent which will contain the volume rendering actor.
Definition: ImageComponent.cpp:519
VolumeRenderingWidget::getTransparencyPoints
QMap< int, double > getTransparencyPoints()
Definition: VolumeRenderingWidget.cpp:212
VolumeRenderingWidget::getDiffuse
double getDiffuse()
Definition: VolumeRenderingWidget.cpp:292
camitk::refresh
void refresh()
refresh the display
VolumeRenderingAction::VolumeRenderingAction
VolumeRenderingAction(camitk::ActionExtension *)
Default Constructor.
Definition: VolumeRenderingAction.cpp:66
VolumeRenderingAction.h
ImageComponent.h
VolumeRenderingWidget::getColorPoints
QMap< int, QColor > getColorPoints()
Definition: VolumeRenderingWidget.cpp:158
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:302
Application.h
camitk
Definition: Action.cpp:35