2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
10 # This software is governed by the CeCILL-B license under French law and
11 # abiding by the rules of distribution of free software. You can use,
12 # modify and/ or redistribute the software under the terms of the CeCILL-B
13 # license as circulated by CEA, CNRS and INRIA at the following URL
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15 # or in the file LICENSE.txt.
17 # As a counterpart to the access to the source code and rights to copy,
18 # modify and redistribute granted by the license, users are provided only
19 # with a limited warranty and the software's author, the holder of the
20 # economic rights, and the successive licensors have only limited
23 # The fact that you are presently reading this means that you have had
24 # knowledge of the CeCILL-B license and that you accept its terms.
25 # ------------------------------------------------------------------------ */
29 // 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)
31 #ifndef __bbvtkMagnitud_h_INCLUDED__
32 #define __bbvtkMagnitud_h_INCLUDED__
33 #include "bbvtk_EXPORT.h"
34 #include "bbtkAtomicBlackBox.h"
39 #include "vtkAppendPolyData.h"
40 #include "vtkArrowSource.h"
41 #include "vtkContourFilter.h"
42 #include "vtkDiskSource.h"
43 #include "vtkGlyph3D.h"
44 #include "vtkImageData.h"
45 #include "vtkImageExport.h"
46 #include "vtkLookupTable.h"
47 #include "vtkMaskPoints.h"
48 #include "vtkOutlineFilter.h"
49 #include "vtkPlaneWidget.h"
50 #include "vtkPlaneSource.h"
51 #include "vtkPointSource.h"
52 #include "vtkPointWidget.h"
53 #include "vtkPolyData.h"
54 #include "vtkPolyDataMapper.h"
55 #include "vtkProbeFilter.h"
56 #include "vtkProp3D.h"
57 #include "vtkProperty.h"
58 #include "vtkProperty2D.h"
59 #include "vtkRenderWindowInteractor.h"
60 #include "vtkScalarBarActor.h"
61 #include "vtkStreamTracer.h"
62 #include "vtkTransform.h"
63 #include "vtkTransformPolyDataFilter.h"
64 #include "vtkTubeFilter.h"
65 #include "vtkVectorNorm.h"
67 #define SIZEPLANWIDGET 64
73 class bbvtk_EXPORT Magnitud
75 public bbtk::AtomicBlackBox
77 BBTK_BLACK_BOX_INTERFACE(Magnitud,bbtk::AtomicBlackBox);
79 // 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)
83 BBTK_DECLARE_INPUT(In,vtkImageData*);
84 BBTK_DECLARE_INPUT(MoveX,double);
85 BBTK_DECLARE_INPUT(MoveY,double);
86 BBTK_DECLARE_INPUT(MoveZ,double);
87 BBTK_DECLARE_INPUT(ValSup,double);
88 BBTK_DECLARE_INPUT(ValInf,double);
89 BBTK_DECLARE_INPUT(MRatio,int);
90 BBTK_DECLARE_INPUT(Opactity,double);
91 BBTK_DECLARE_INPUT(Scale,double);
92 BBTK_DECLARE_INPUT(Contour,int);
93 BBTK_DECLARE_INPUT(ShowPlane,int);
94 BBTK_DECLARE_INPUT(ShowStream,int);
95 BBTK_DECLARE_INPUT(PlaneCenterSL,std::vector<double>);
97 BBTK_DECLARE_OUTPUT(Out1,vtkProp3D*);
98 BBTK_DECLARE_OUTPUT(Out2,vtkProp3D*);
99 BBTK_DECLARE_OUTPUT(Out3,vtkProp3D*);
100 BBTK_DECLARE_OUTPUT(Out4,vtkProp3D*);
101 //BBTK_DECLARE_OUTPUT(Out5,vtkProp*);
102 BBTK_DECLARE_OUTPUT(Out5,vtkProp3D*);
103 //BBTK_DECLARE_OUTPUT(OutExport,vtkImageExport*);
104 //BBTK_DECLARE_OUTPUT(OutTest,vtkImageData*);
107 BBTK_PROCESS(Process);
110 // 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)
114 std::vector<double> tempc;
118 double p0[3], p1[3],p2[3], n[3], c[3], slCenter[3];
128 double dRangeColorForGlyphVelocity[2];
129 double dRangeColorForMultipleContourVelocity[2];
130 double dRangeColorForGlyphVelocityForFlowPlane[2];
138 vtkActor *vGlyphActor;
139 vtkActor *vMultipleContourActor;
140 vtkActor *vOutlineActor;
141 vtkActor *vSliceActor;
142 vtkActor *vStreamlineActor2;
143 vtkAppendPolyData *vAppendDataForFlowWidgetVisualisation;
144 vtkArrowSource *cone;
145 vtkArrowSource *vArrowSource;
146 vtkContourFilter *vMultipleContourVelocity;
147 vtkDiskSource *vDiskSourceEED;
149 vtkGlyph3D *vGlyphFlowPlane;
150 vtkImageExport *exporter;
151 vtkLookupTable *vGreenToRedLut;
152 vtkMaskPoints *vMaskPoint;
153 vtkPlaneSource *vPlanSource;
154 vtkProbeFilter *vProbeslices;
155 vtkProbeFilter *vProbeslicesFlowWidget;
156 vtkPlaneWidget *vPlaneWidget;
158 vtkPolyDataMapper *vSliceMapper;
159 vtkPointSource *source;
160 vtkPointWidget *vPointWidget;
161 vtkPolyDataMapper *vGlyphMapper;
162 vtkPolyDataMapper *vMultipleContourMapper;
163 vtkOutlineFilter *vOutlineGrid;
164 vtkPolyDataMapper *vOutlineMapper;
165 vtkPolyDataMapper *streamMapper2;
166 vtkRenderWindowInteractor *vIren;
167 vtkScalarBarActor *vScalarBarActor;
168 vtkStreamTracer *streamer;
169 vtkTransform *transformEED;
170 vtkTransformPolyDataFilter *vtransformpolydatafilter;
172 vtkVectorNorm *vVecMagnitude;
177 BBTK_BEGIN_DESCRIBE_BLACK_BOX(Magnitud,bbtk::AtomicBlackBox);
178 BBTK_NAME("Magnitud");
179 BBTK_AUTHOR("seba-tor@uniandes.edu.co");
180 BBTK_DESCRIPTION("Receive an ImgaData and generates an Actor. 'EED this box habe to be splited in 5 box'");
183 BBTK_INPUT(Magnitud,In,"Receive the image source",vtkImageData*, "");
184 BBTK_INPUT(Magnitud,MoveX,"Move the PlaneSource - X Axis",double, "");
185 BBTK_INPUT(Magnitud,MoveY,"Move the PlaneSource - Y Axis",double, "");
186 BBTK_INPUT(Magnitud,MoveZ,"Move the PlaneSource - Z Axis",double, "");
187 BBTK_INPUT(Magnitud,ValSup,"Set the Superior Range of the Colour Range: [0% - 100%]",double, "");
188 BBTK_INPUT(Magnitud,ValInf,"Set the Inferior Range of the Colour Range: [0% - 100%]",double, "");
189 BBTK_INPUT(Magnitud,MRatio,"Set the Radio of the Mask",int, "");
190 BBTK_INPUT(Magnitud,Opactity,"Set the Opacity of the Glyph",double, "");
191 BBTK_INPUT(Magnitud,Scale,"Set the Scale of the Glyph",double, "");
192 BBTK_INPUT(Magnitud,Contour,"Set the Contour Number",int, "");
193 BBTK_INPUT(Magnitud,ShowPlane,"Show the PlaneWidget",int, "");
194 BBTK_INPUT(Magnitud,ShowStream,"Show the Stream Lines",int, "");
195 BBTK_INPUT(Magnitud,PlaneCenterSL,"Center for the Stream Lines",std::vector<double>, "");
197 BBTK_OUTPUT(Magnitud,Out1,"Actor1 3D - SliceActor",vtkProp3D*, "");
198 BBTK_OUTPUT(Magnitud,Out2,"Actor2 3D - GlyphActor",vtkProp3D*, "");
199 BBTK_OUTPUT(Magnitud,Out3,"Actor3 3D - OutlineActor",vtkProp3D*, "");
200 BBTK_OUTPUT(Magnitud,Out4,"Actor4 3D - MultipleContourActor",vtkProp3D*, "");
201 //BBTK_OUTPUT(Magnitud,Out5,"Actor5 2D - ScalarBarActor",vtkProp*, "");
202 BBTK_OUTPUT(Magnitud,Out5,"Actor5 3D - SteamlineActor",vtkProp3D*, "");
203 //BBTK_OUTPUT(Magnitud,OutExport,"Exports the Contour Image",vtkImageExport*, "");
204 //BBTK_OUTPUT(Magnitud,OutTest,"Test",vtkImageData*, "");
206 BBTK_END_DESCRIBE_BLACK_BOX(Magnitud);
208 // 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)
211 // EO namespace bbvtk
213 #endif // __bbvtkMagnitud_h_INCLUDED__