Computer Assisted Medical Intervention Tool Kit  version 5.1
MeshClipping.h
Go to the documentation of this file.
1/*****************************************************************************
2 * $CAMITK_LICENCE_BEGIN$
3 *
4 * CamiTK - Computer Assisted Medical Intervention ToolKit
5 * (c) 2001-2023 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
26#ifndef MESH_CLIPPING_H
27#define MESH_CLIPPING_H
28
29//-- Specific action stuffs
30#include "PlaneWidget.h"
31
32//-- Core stuffs
33#include <Action.h>
34#include <MeshComponent.h>
35
36// VTK stuffs
37#include <vtkSmartPointer.h>
38#include <vtkPlane.h>
39
61 Q_OBJECT
62
63public:
66
68 virtual ~MeshClipping();
69
71 virtual QWidget* getWidget();
72
73public slots:
76
78 virtual void meshDeleted();
79
80private:
84 void customizeActionLayout();
85
87 ApplyStatus clipMesh(camitk::MeshComponent* mesh, vtkSmartPointer<vtkPlane> plane);
88
91
93 PlaneWidget* widget;
94
96 bool smoothing;
97
99 bool allComponents;
100
102 bool planeVisibility;
103
105 bool save;
106
108 double limBounds[6];
109
110private slots:
111
115 void updateBox();
116
118 void restoreMeshes();
119
121 void changeAllComponents();
122
124 void changeSmoothing();
125
127 void changeVisibility();
128
130 void saveClippedMeshes();
131
132private:
135 void updateBox(bool refreshViewer);
136
137};
138
139#endif // MESH_CLIPPING_H
This action allows the user to clip several kinds of MeshComponents : vtkStructuredGridClip,...
Definition: MeshClipping.h:60
virtual camitk::Action::ApplyStatus apply()
Method called when the action is applied.
Definition: MeshClipping.cpp:142
MeshClipping(camitk::ActionExtension *)
The constructor.
Definition: MeshClipping.cpp:55
virtual void meshDeleted()
specific slot called when the mesh currently clipped is deleted
Definition: MeshClipping.cpp:197
virtual ~MeshClipping()
The destructor.
Definition: MeshClipping.cpp:77
virtual QWidget * getWidget()
Method called when the action when the action is triggered (i.e. started).
Definition: MeshClipping.cpp:82
This class implements a VTK implicit plane in the CamiTK application.
Definition: PlaneWidget.h:48
This class describes what is a generic Action extension.
Definition: ActionExtension.h:57
Action class is an abstract class that enables you to build a action (generally on a component).
Definition: Action.h:208
ApplyStatus
describes what happened during the application of an algorithm (i.e. results of the apply method)
Definition: Action.h:224
Basic component to manage any kind of mesh.
Definition: MeshComponent.h:53
QList< Component * > ComponentList
A list of Component.
Definition: CamiTKAPI.h:127