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)
4 #ifndef __bbvtkMagnitud_h_INCLUDED__
5 #define __bbvtkMagnitud_h_INCLUDED__
6 #include "bbvtk_EXPORT.h"
7 #include "bbtkAtomicBlackBox.h"
12 #include "vtkAppendPolyData.h"
13 #include "vtkArrowSource.h"
14 #include "vtkContourFilter.h"
15 #include "vtkDiskSource.h"
16 #include "vtkGlyph3D.h"
17 #include "vtkImageData.h"
18 #include "vtkImageExport.h"
19 #include "vtkLookupTable.h"
20 #include "vtkMaskPoints.h"
21 #include "vtkOutlineFilter.h"
22 #include "vtkPlaneWidget.h"
23 #include "vtkPlaneSource.h"
24 #include "vtkPointSource.h"
25 #include "vtkPointWidget.h"
26 #include "vtkPolyData.h"
27 #include "vtkPolyDataMapper.h"
28 #include "vtkProbeFilter.h"
29 #include "vtkProp3D.h"
30 #include "vtkProperty.h"
31 #include "vtkProperty2D.h"
32 #include "vtkRenderWindowInteractor.h"
33 #include "vtkScalarBarActor.h"
34 #include "vtkStreamTracer.h"
35 #include "vtkTransform.h"
36 #include "vtkTransformPolyDataFilter.h"
37 #include "vtkTubeFilter.h"
38 #include "vtkVectorNorm.h"
40 #define SIZEPLANWIDGET 64
46 class bbvtk_EXPORT Magnitud
48 public bbtk::AtomicBlackBox
50 BBTK_BLACK_BOX_INTERFACE(Magnitud,bbtk::AtomicBlackBox);
52 // 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)
56 BBTK_DECLARE_INPUT(In,vtkImageData*);
57 BBTK_DECLARE_INPUT(MoveX,double);
58 BBTK_DECLARE_INPUT(MoveY,double);
59 BBTK_DECLARE_INPUT(MoveZ,double);
60 BBTK_DECLARE_INPUT(ValSup,double);
61 BBTK_DECLARE_INPUT(ValInf,double);
62 BBTK_DECLARE_INPUT(MRatio,int);
63 BBTK_DECLARE_INPUT(Opactity,double);
64 BBTK_DECLARE_INPUT(Scale,double);
65 BBTK_DECLARE_INPUT(Contour,int);
66 BBTK_DECLARE_INPUT(ShowPlane,int);
67 BBTK_DECLARE_INPUT(ShowStream,int);
68 BBTK_DECLARE_INPUT(PlaneCenterSL,std::vector<double>);
70 BBTK_DECLARE_OUTPUT(Out1,vtkProp3D*);
71 BBTK_DECLARE_OUTPUT(Out2,vtkProp3D*);
72 BBTK_DECLARE_OUTPUT(Out3,vtkProp3D*);
73 BBTK_DECLARE_OUTPUT(Out4,vtkProp3D*);
74 //BBTK_DECLARE_OUTPUT(Out5,vtkProp*);
75 BBTK_DECLARE_OUTPUT(Out5,vtkProp3D*);
76 //BBTK_DECLARE_OUTPUT(OutExport,vtkImageExport*);
77 //BBTK_DECLARE_OUTPUT(OutTest,vtkImageData*);
80 BBTK_PROCESS(Process);
83 // 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)
87 std::vector<double> tempc;
91 double p0[3], p1[3],p2[3], n[3], c[3], slCenter[3];
101 double dRangeColorForGlyphVelocity[2];
102 double dRangeColorForMultipleContourVelocity[2];
103 double dRangeColorForGlyphVelocityForFlowPlane[2];
111 vtkActor* vGlyphActor;
112 vtkActor* vMultipleContourActor;
113 vtkActor* vOutlineActor;
114 vtkActor* vSliceActor;
115 vtkActor* vStreamlineActor2;
116 vtkAppendPolyData* vAppendDataForFlowWidgetVisualisation;
117 vtkArrowSource* cone;
118 vtkArrowSource* vArrowSource;
119 vtkContourFilter* vMultipleContourVelocity;
120 vtkDiskSource* vDiskSourceEED;
122 vtkGlyph3D* vGlyphFlowPlane;
123 vtkImageExport* exporter;
124 vtkLookupTable* vGreenToRedLut;
125 vtkMaskPoints* vMaskPoint;
126 vtkPlaneSource* vPlanSource;
127 vtkProbeFilter* vProbeslices;
128 vtkProbeFilter* vProbeslicesFlowWidget;
129 vtkPlaneWidget* vPlaneWidget;
131 vtkPolyDataMapper* vSliceMapper;
132 vtkPointSource* source;
133 vtkPointWidget* vPointWidget;
134 vtkPolyDataMapper* vGlyphMapper;
135 vtkPolyDataMapper* vMultipleContourMapper;
136 vtkOutlineFilter* vOutlineGrid;
137 vtkPolyDataMapper* vOutlineMapper;
138 vtkPolyDataMapper* streamMapper2;
139 vtkRenderWindowInteractor* vIren;
140 vtkScalarBarActor* vScalarBarActor;
141 vtkStreamTracer* streamer;
142 vtkTransform* transformEED;
143 vtkTransformPolyDataFilter* vtransformpolydatafilter;
145 vtkVectorNorm* vVecMagnitude;
150 BBTK_BEGIN_DESCRIBE_BLACK_BOX(Magnitud,bbtk::AtomicBlackBox);
151 BBTK_NAME("Magnitud");
152 BBTK_AUTHOR("seba-tor@uniandes.edu.co");
153 BBTK_DESCRIPTION("Receive an ImgaData and generates an Actor");
156 BBTK_INPUT(Magnitud,In,"Receive the image source",vtkImageData*, "");
157 BBTK_INPUT(Magnitud,MoveX,"Move the PlaneSource - X Axis",double, "");
158 BBTK_INPUT(Magnitud,MoveY,"Move the PlaneSource - Y Axis",double, "");
159 BBTK_INPUT(Magnitud,MoveZ,"Move the PlaneSource - Z Axis",double, "");
160 BBTK_INPUT(Magnitud,ValSup,"Set the Superior Range of the Colour Range: [0% - 100%]",double, "");
161 BBTK_INPUT(Magnitud,ValInf,"Set the Inferior Range of the Colour Range: [0% - 100%]",double, "");
162 BBTK_INPUT(Magnitud,MRatio,"Set the Radio of the Mask",int, "");
163 BBTK_INPUT(Magnitud,Opactity,"Set the Opacity of the Glyph",double, "");
164 BBTK_INPUT(Magnitud,Scale,"Set the Scale of the Glyph",double, "");
165 BBTK_INPUT(Magnitud,Contour,"Set the Contour Number",int, "");
166 BBTK_INPUT(Magnitud,ShowPlane,"Show the PlaneWidget",int, "");
167 BBTK_INPUT(Magnitud,ShowStream,"Show the Stream Lines",int, "");
168 BBTK_INPUT(Magnitud,PlaneCenterSL,"Center for the Stream Lines",std::vector<double>, "");
170 BBTK_OUTPUT(Magnitud,Out1,"Actor1 3D - SliceActor",vtkProp3D*, "");
171 BBTK_OUTPUT(Magnitud,Out2,"Actor2 3D - GlyphActor",vtkProp3D*, "");
172 BBTK_OUTPUT(Magnitud,Out3,"Actor3 3D - OutlineActor",vtkProp3D*, "");
173 BBTK_OUTPUT(Magnitud,Out4,"Actor4 3D - MultipleContourActor",vtkProp3D*, "");
174 //BBTK_OUTPUT(Magnitud,Out5,"Actor5 2D - ScalarBarActor",vtkProp*, "");
175 BBTK_OUTPUT(Magnitud,Out5,"Actor5 3D - SteamlineActor",vtkProp3D*, "");
176 //BBTK_OUTPUT(Magnitud,OutExport,"Exports the Contour Image",vtkImageExport*, "");
177 //BBTK_OUTPUT(Magnitud,OutTest,"Test",vtkImageData*, "");
179 BBTK_END_DESCRIBE_BLACK_BOX(Magnitud);
181 // 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)
184 // EO namespace bbvtk
186 #endif // __bbvtkMagnitud_h_INCLUDED__