CustusX  2023.01.05-dev+develop.0da12
An IGT application
cxSlicePlaneClipper.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 
13 #ifndef CXSLICEPLANECLIPPER_H_
14 #define CXSLICEPLANECLIPPER_H_
15 
16 #include "cxResourceVisualizationExport.h"
17 
18 #include <set>
19 #include <vector>
20 #include <boost/shared_ptr.hpp>
21 #include <vtkSmartPointer.h>
22 #include <QObject>
23 #include "cxForwardDeclarations.h"
24 #include "cxVector3D.h"
25 #include "vtkForwardDeclarations.h"
26 
27 namespace cx
28 {
29 typedef boost::shared_ptr<class SlicePlaneClipper> SlicePlaneClipperPtr;
30 
31 /*
32  * \date Aug 20, 2010
33  * \author christiana
34  */
35 
44 class cxResourceVisualization_EXPORT SlicePlaneClipper : public QObject
45 {
46  Q_OBJECT
47 public:
48  typedef std::set<VolumetricBaseRepPtr> VolumesType;
49 
50  static SlicePlaneClipperPtr New();
52  void setSlicer(SliceProxyPtr slicer);
53  SliceProxyPtr getSlicer();
54  void setInvertPlane(bool on);
55  bool getInvertPlane() const;
56  vtkPlanePtr getClipPlaneCopy();
57  vtkPlanePtr getClipPlane();
58 
59 signals:
60  void slicePlaneChanged();
61 private slots:
62  void changedSlot();
63 private:
65  void updateClipPlane();
66  Vector3D getUnitNormal() const;
67  SliceProxyPtr mSlicer;
68  bool mInvertPlane;
69 
70  vtkPlanePtr mClipPlane;
71 };
72 
73 } // namespace cx
74 
75 #endif /* CXSLICEPLANECLIPPER_H_ */
std::set< VolumetricBaseRepPtr > VolumesType
boost::shared_ptr< class SliceProxy > SliceProxyPtr
Eigen::Vector3d Vector3D
Vector3D is a representation of a point or vector in 3D.
Definition: cxVector3D.h:42
boost::shared_ptr< class SlicePlaneClipper > SlicePlaneClipperPtr
Clip several 3D volumes using a SliceProxy.
vtkSmartPointer< class vtkPlane > vtkPlanePtr
Namespace for all CustusX production code.