]> Creatis software - bbtk.git/blob - packages/vtk/src/bbvtkMagnitud.h
18e92ddbad11096f3ebc5b836ef5615c011d6a28
[bbtk.git] / packages / vtk / src / bbvtkMagnitud.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 __bbvtkMagnitud_h_INCLUDED__
5 #define __bbvtkMagnitud_h_INCLUDED__
6 #include "bbvtk_EXPORT.h"
7 #include "bbtkAtomicBlackBox.h"
8 #include "iostream"
9
10 // ----------[
11 #include "vtkActor.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"
39
40 #define SIZEPLANWIDGET 64
41 // ----------]
42
43 namespace bbvtk
44 {
45
46 class bbvtk_EXPORT Magnitud
47  : 
48    public bbtk::AtomicBlackBox
49 {
50   BBTK_BLACK_BOX_INTERFACE(Magnitud,bbtk::AtomicBlackBox);
51 //===== 
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)
53 //===== 
54
55 // -------------- [
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>);
69
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*);
78 // -------------- ]
79
80   BBTK_PROCESS(Process);
81   void Process();
82 //===== 
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)
84 //===== 
85 // -------------- [
86    vtkImageData* temp;
87    std::vector<double> tempc;
88
89    int sizeIma;
90    long int index;
91    double p0[3], p1[3],p2[3], n[3], c[3], slCenter[3];
92    double range[2];
93    double range1[2];
94    double step;
95    double h;
96    double nx;
97    double ny;
98    double nz;
99    double alfa;
100    double beta;
101    double dRangeColorForGlyphVelocity[2];
102    double dRangeColorForMultipleContourVelocity[2];
103    double dRangeColorForGlyphVelocityForFlowPlane[2];
104
105    int Ratio;
106    double dOpactity;
107    double dScale;
108    int nContour;
109    bool bShow;
110    
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;
121    vtkGlyph3D* vGlyph;
122    vtkGlyph3D* vGlyphFlowPlane;
123    vtkImageExport* exporter;
124    vtkLookupTable* vGreenToRedLut;
125    vtkMaskPoints* vMaskPoint;
126    vtkPlaneSource* vPlanSource;
127    vtkProbeFilter* vProbeslices;
128    vtkProbeFilter* vProbeslicesFlowWidget;
129    vtkPlaneWidget* vPlaneWidget;
130    vtkPolyData* point;
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;
144    vtkTubeFilter* rf;
145    vtkVectorNorm* vVecMagnitude;
146 // -------------- ]
147
148 };
149
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");
154 BBTK_CATEGORY("");
155 // -------------- [
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>, "");
169
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*, "");
178 // -------------- ]
179 BBTK_END_DESCRIBE_BLACK_BOX(Magnitud);
180 //===== 
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)
182 //===== 
183 }
184 // EO namespace bbvtk
185
186 #endif // __bbvtkMagnitud_h_INCLUDED__
187