]> Creatis software - bbtk.git/blob - packages/vtk/src/bbvtkPlaneClipPolyData.h
Feature #1894 Black box to clip a polydata with a plane.
[bbtk.git] / packages / vtk / src / bbvtkPlaneClipPolyData.h
1 //===== 
2 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
3 //===== 
4 #ifndef __bbvtkPlaneClipPolyData_h_INCLUDED__
5 #define __bbvtkPlaneClipPolyData_h_INCLUDED__
6 #include "bbvtk_EXPORT.h"
7 #include "bbtkAtomicBlackBox.h"
8 #include "iostream"
9
10 #include <vtkSmartPointer.h>
11 #include <vtkPolyData.h>
12 #include <vtkClipPolyData.h>
13 #include <vtkPlane.h>
14
15 #include <vtkDataSetMapper.h>
16 #include <vtkActor.h>
17 #include <vtkRenderer.h>
18 #include <vtkRenderWindow.h>
19 #include <vtkRenderWindowInteractor.h>
20
21 #include <vtkCamera.h>
22 #include <vtkPolyDataMapper.h>
23 #include <vtkActor.h>
24 #include <vtkProperty.h>
25 #include <vtkSphereSource.h>
26
27 namespace bbvtk
28 {
29
30 class bbvtk_EXPORT PlaneClipPolyData
31  : 
32    public bbtk::AtomicBlackBox
33 {
34   BBTK_BLACK_BOX_INTERFACE(PlaneClipPolyData,bbtk::AtomicBlackBox);
35 //===== 
36 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
37 //===== 
38   BBTK_DECLARE_INPUT(PlaneOrigin,std::vector<double>);
39   BBTK_DECLARE_INPUT(PlaneNormal,std::vector<double>);
40   BBTK_DECLARE_INPUT(PolyData,vtkPolyData*);
41   BBTK_DECLARE_OUTPUT(ClippedPolyData,vtkPolyData*);
42   BBTK_PROCESS(Process);
43   void Process();
44
45
46 //===== 
47 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
48 //===== 
49 };
50
51 BBTK_BEGIN_DESCRIBE_BLACK_BOX(PlaneClipPolyData,bbtk::AtomicBlackBox);
52 BBTK_NAME("PlaneClipPolyData");
53 BBTK_AUTHOR("Ricardo A Corredor");
54 BBTK_DESCRIPTION("Clips a polydata with a plane determined by the origin and normal given");
55 BBTK_CATEGORY("");
56 BBTK_INPUT(PlaneClipPolyData,PlaneOrigin,"Cutting plane origin",std::vector<double>,"");
57 BBTK_INPUT(PlaneClipPolyData,PlaneNormal,"Cutting plane normal",std::vector<double>,"");
58 BBTK_INPUT(PlaneClipPolyData,PolyData,"PolyData to be clipped",vtkPolyData*,"");
59 BBTK_OUTPUT(PlaneClipPolyData,ClippedPolyData,"New PolyData clipped",vtkPolyData*,"");
60 BBTK_END_DESCRIBE_BLACK_BOX(PlaneClipPolyData);
61 //===== 
62 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
63 //===== 
64 }
65 // EO namespace bbvtk
66
67 #endif // __bbvtkPlaneClipPolyData_h_INCLUDED__
68