Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

VolumeRenderingAction.h 2.74 KB
Newer Older
cfouard's avatar
cfouard committed
1
2
3
4
/*****************************************************************************
 * $CAMITK_LICENCE_BEGIN$
 *
 * CamiTK - Computer Assisted Medical Intervention ToolKit
5
 * (c) 2001-2018 Univ. Grenoble Alpes, CNRS, TIMC-IMAG UMR 5525 (GMCAO)
cfouard's avatar
cfouard committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 *
 * Visit http://camitk.imag.fr for more information
 *
 * This file is part of CamiTK.
 *
 * CamiTK is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License version 3
 * only, as published by the Free Software Foundation.
 *
 * CamiTK is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License version 3 for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * version 3 along with CamiTK.  If not, see <http://www.gnu.org/licenses/>.
 *
 * $CAMITK_LICENCE_END$
 ****************************************************************************/
#ifndef VOLUMERENDERINGACTION_H
#define VOLUMERENDERINGACTION_H

#include <QObject>
#include <Action.h>

#include <ImageComponent.h>

#include "VolumeRenderingWidget.h"

35
36
/**
 * @ingroup group_sdk_actions_image_volumerendering
37
 *
38
39
 * @brief
 * This action perform a volume rendering.
40
 *
41
 * Take as an input a gray-level @ref camitk::ImageComponent and renders a 3D color image.
42
 *
43
 */
cfouard's avatar
cfouard committed
44
class VolumeRenderingAction : public camitk::Action {
45
    Q_OBJECT
cfouard's avatar
cfouard committed
46

47
48
public:
    /// Default Constructor
49
    VolumeRenderingAction(camitk::ActionExtension*);
cfouard's avatar
cfouard committed
50
51

    /// Default Destructor
52
    virtual ~VolumeRenderingAction() = default;
cfouard's avatar
cfouard committed
53

54
    void createVolumeRendering(camitk::ImageComponent* comp);
cfouard's avatar
cfouard committed
55
56
57
58

public slots:
    /** this method is automatically called when the action is triggered.
      * Call getTargets() method to get the list of components to use.
59
      * \note getTargets() is automatically filtered so that it only contains compatible components,
cfouard's avatar
cfouard committed
60
61
62
63
      * i.e., instances of ImageComponent (or a subclass).
      */
    virtual ApplyStatus apply();

64
65
    // Returns NULL: no permanent widget for this action. The GUI is run shown a one-shot dialog in apply
    // A special widget will be displaied to edit colors.
66
    virtual QWidget* getWidget();
cfouard's avatar
cfouard committed
67
68


69
private:
cfouard's avatar
cfouard committed
70
    /// helper method to simplify the target component processing
71
    virtual void process(camitk::ImageComponent* comp);
cfouard's avatar
cfouard committed
72
73


74
    /// no default widget but a VolumeRenderingWidget displaied when necessary
75
    VolumeRenderingWidget* myWidget;
76
77
78
79

    /// Name given to the Volume rendering actor attached to the Volume Rendering subComponant
    /// of a volume image
    QString volumeName;
cfouard's avatar
cfouard committed
80
81


82
};
cfouard's avatar
cfouard committed
83
#endif // VOLUMERENDERINGACTION_H