]> Creatis software - bbtk.git/blob - packages/vtk/src/bbvtkMagnitud.cxx
#3403 BBTK Feature New Normal - vtk8itk5wx3-macos
[bbtk.git] / packages / vtk / src / bbvtkMagnitud.cxx
1 /*
2  # ---------------------------------------------------------------------
3  #
4  # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5  #                        pour la Santé©
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
9  #
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.
16  #
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
21  #  liability.
22  #
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  # ------------------------------------------------------------------------ */
26
27
28 //=====
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)
30 //===== 
31 #include "bbvtkMagnitud.h"
32 #include "bbvtkPackage.h"
33 namespace bbvtk
34 {
35
36 BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,Magnitud)
37 BBTK_BLACK_BOX_IMPLEMENTATION(Magnitud,bbtk::AtomicBlackBox);
38 //===== 
39 // 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)
40 //===== 
41 void Magnitud::Process()
42 {
43
44 printf("EED Magnitud::Process Start\n");
45
46 // THE MAIN PROCESSING METHOD BODY
47 //   Here we simply set the input 'In' value to the output 'Out'
48 //   And print out the output value
49 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
50 //    void bbSet{Input|Output}NAME(const TYPE&)
51 //    const TYPE& bbGet{Input|Output}NAME() const 
52 //    Where :
53 //    * NAME is the name of the input/output
54 //      (the one provided in the attribute 'name' of the tag 'input')
55 //    * TYPE is the C++ type of the input/output
56 //      (the one provided in the attribute 'type' of the tag 'input')
57
58 // ---------- 
59         if (bbGetInputIn()!=NULL) 
60         {
61                 vGreenToRedLut->SetHueRange(0.6667,0.0);
62                 vGreenToRedLut->Build();
63   
64   //Input Data
65 //EED 2017-01-01 Migration VTK7
66 #if (VTK_MAJOR_VERSION <= 5) 
67    vVecMagnitude->SetInput(bbGetInputIn());
68 #endif
69 #if (VTK_MAJOR_VERSION >= 6) 
70    vVecMagnitude->SetInputData(bbGetInputIn());
71 #endif
72
73    vVecMagnitude->NormalizeOff();
74    vVecMagnitude->Update();
75    vVecMagnitude->GetOutput()->GetScalarRange( range1 );
76    vVecMagnitude->Update();
77    
78    //Glyph
79 //EED 2017-01-01 Migration VTK7
80 #if (VTK_MAJOR_VERSION <= 5) 
81    vMaskPoint->SetInput(bbGetInputIn());
82 #endif
83 #if (VTK_MAJOR_VERSION >= 6) 
84    vMaskPoint->SetInputData(bbGetInputIn());
85 #endif
86
87    vMaskPoint->SetOnRatio(100);
88    vMaskPoint->Update();
89    vMaskPoint->RandomModeOn();
90
91    vGlyph->SetScaleModeToScaleByVector();
92    vGlyph->SetColorModeToColorByVector();
93    vGlyph->SetScaleFactor(0.20);
94    
95 //EED 2017-01-01 Migration VTK7
96 #if (VTK_MAJOR_VERSION <= 5) 
97    vGlyph->SetInput(vMaskPoint->GetOutput());
98    vGlyph->SetSource(cone->GetOutput());
99 #endif
100 #if (VTK_MAJOR_VERSION >= 6) 
101    vGlyph->SetInputData(vMaskPoint->GetOutput());
102         cone->Update();
103    vGlyph->SetSourceData(cone->GetOutput());
104 #endif
105
106
107 //EED 2017-01-01 Migration VTK7
108 #if (VTK_MAJOR_VERSION <= 5) 
109    vGlyphMapper->SetInput( vGlyph->GetOutput() );
110 #endif
111 #if (VTK_MAJOR_VERSION >= 6) 
112    vGlyphMapper->SetInputData( vGlyph->GetOutput() );
113 #endif
114
115    step = (range1[1]-range1[0])/10;
116       
117    //Contour
118    dRangeColorForMultipleContourVelocity[0]     = 0;
119    dRangeColorForMultipleContourVelocity[1]     = 1;
120    dRangeColorForGlyphVelocity[0]                       = 0;
121    dRangeColorForGlyphVelocity[1]                       = 1;
122 //EED 2017-01-01 Migration VTK7
123 #if (VTK_MAJOR_VERSION <= 5) 
124    vMultipleContourVelocity->SetInput((vtkDataSet *) vVecMagnitude->GetOutput()); 
125 #endif
126 #if (VTK_MAJOR_VERSION >= 6) 
127    vMultipleContourVelocity->SetInputData((vtkDataSet *) vVecMagnitude->GetOutput()); 
128 #endif
129    
130    index = 0;
131    double h;
132    step = (range1[1]-range1[0])/10;
133
134    for( h=range1[0]; h<range1[1]; h+=step )
135    {
136       vMultipleContourVelocity->SetValue(index, h);
137       index+=1;
138    }
139    
140 //EED 2017-01-01 Migration VTK7
141 #if (VTK_MAJOR_VERSION <= 5) 
142    vMultipleContourMapper->SetInput( vMultipleContourVelocity->GetOutput() );
143 #endif
144 #if (VTK_MAJOR_VERSION >= 6) 
145    vMultipleContourMapper->SetInputData( vMultipleContourVelocity->GetOutput() );
146 #endif
147
148    vMultipleContourMapper->SetScalarRange( range1 );
149    vMultipleContourMapper->SetLookupTable( vGreenToRedLut );
150    vMultipleContourMapper->Update();
151    vMultipleContourActor->SetMapper( vMultipleContourMapper );
152    vMultipleContourActor->GetProperty()->SetOpacity(0.4);
153
154    //Glyph Mapper
155    vGlyphMapper->SetLookupTable(vGreenToRedLut);
156    vGlyphMapper->SetScalarRange(range1);
157 //EED 2020-04-21 vtk8 deprecated
158 //   vGlyphMapper->ImmediateModeRenderingOn();
159  
160    //Outline Grid
161 //EED 2017-01-01 Migration VTK7
162 #if (VTK_MAJOR_VERSION <= 5) 
163    vOutlineGrid->SetInput( bbGetInputIn() );
164    vOutlineMapper->SetInput(vOutlineGrid->GetOutput());
165 #endif
166 #if (VTK_MAJOR_VERSION >= 6) 
167    vOutlineGrid->SetInputData( bbGetInputIn() );
168         vOutlineGrid->Update();
169    vOutlineMapper->SetInputData( vOutlineGrid->GetOutput() );
170 #endif
171
172    
173    //Outline Grid Actor
174    vOutlineActor->SetMapper(vOutlineMapper);
175  
176    //Glyph Actor
177    vGlyphActor->SetMapper( vGlyphMapper ); 
178    vGlyphActor->GetProperty()->SetOpacity(0); 
179   
180    //The Velocity Bar - Indicator (It's Actor is a vtkProper)
181    vScalarBarActor->SetLookupTable (vMultipleContourMapper->GetLookupTable());
182    vScalarBarActor->SetTitle ("Velocity");
183    vScalarBarActor->GetPositionCoordinate()->SetCoordinateSystemToNormalizedViewport();
184    vScalarBarActor->GetPositionCoordinate()->SetValue( 0.85, 0.25);
185    vScalarBarActor->SetOrientationToVertical();
186    vScalarBarActor->SetWidth (0.1);
187    vScalarBarActor->SetHeight (0.6);
188    vScalarBarActor->GetProperty()->SetOpacity(1); // 1 to Show - 0 to Hide
189    
190    ///////////////////////////////////////////////////////////////////////////////////////////////////
191    //Start: Change values by the user
192    ///////////////////////////////////////////////////////////////////////////////////////////////////
193    //Glyph Mask
194    vMaskPoint->SetOnRatio( bbGetInputMRatio());
195    vMaskPoint->Update();
196
197    //Glyph Opacity
198    vGlyphActor->GetProperty()->SetOpacity( bbGetInputOpactity()/100 );
199    vGlyph->SetScaleFactor(vGlyph->GetScaleFactor()-0.1);
200    vGlyph->Update();
201    vGlyph->SetScaleFactor(vGlyph->GetScaleFactor()+0.1);
202    vGlyph->Update();
203    if( (bbGetInputScale()/100)<0 ) 
204         {
205       bbSetInputScale(0);
206         }
207    if( (bbGetInputScale()/100)>1 ) 
208         {
209       bbSetInputScale(1);
210    }
211
212    //vGlyph->SetScaleFactor(dScale);
213    vGlyph->SetScaleFactor( bbGetInputScale()/100 );
214    vGlyph->Update();
215
216    //Set Glyph and Contour Colour Range
217    vVecMagnitude->GetOutput()->GetScalarRange( range1 );
218    dRangeColorForGlyphVelocity[0] = bbGetInputValInf()/100;
219    dRangeColorForGlyphVelocity[1] = bbGetInputValSup()/100;
220    dRangeColorForMultipleContourVelocity[0] = bbGetInputValInf()/100;
221    dRangeColorForMultipleContourVelocity[1] = bbGetInputValSup()/100;
222    double dTailleInterval=range1[1]-range1[0];
223    
224    range1[1]=range1[0]+dTailleInterval*(bbGetInputValSup()/100);
225    range1[0]=range1[0]+dTailleInterval*(bbGetInputValInf()/100);
226    
227    vGlyphMapper->SetScalarRange( range1 );
228    vMultipleContourMapper->SetScalarRange( range1 );
229
230    if( bbGetInputOpactity()/100<0 ) 
231         {
232         bbSetInputOpactity(0);
233         }
234
235    if( bbGetInputOpactity()/100>1 ) 
236         {
237         bbSetInputOpactity(1);
238         }
239
240    //Set Contour Opacity
241    vMultipleContourActor->GetProperty()->SetOpacity( bbGetInputOpactity()/100 );
242    vMultipleContourVelocity->SetNumberOfContours(vMultipleContourVelocity->GetNumberOfContours()+1);
243    vMultipleContourVelocity->Update();
244    vMultipleContourVelocity->SetNumberOfContours(vMultipleContourVelocity->GetNumberOfContours()-1);
245    vMultipleContourVelocity->Update();
246
247    //Set The Number of Contours
248    if( bbGetInputContour()<1) 
249         {
250                 bbSetInputContour(1);
251         }
252
253    step=(range1[1]-range1[0])/bbGetInputContour();
254    index=0;
255    for( h=range1[0]; h<range1[1]; h+=step)
256    {
257       vMultipleContourVelocity->SetValue(index, h);
258      index+=1;
259    }
260    ///////////////////////////////////////////////////////////////////////////////////////////////////
261    //End: Change values by the user
262    ///////////////////////////////////////////////////////////////////////////////////////////////////
263    //The Plane Widget
264 //EED 2017-01-01 Migration VTK7
265 #if (VTK_MAJOR_VERSION <= 5) 
266    vPlaneWidget->SetInput(bbGetInputIn());
267 #endif
268 #if (VTK_MAJOR_VERSION >= 6) 
269    vPlaneWidget->SetInputData(bbGetInputIn());
270 #endif
271    vPlaneWidget->NormalToXAxisOn();
272    vPlaneWidget->NormalToZAxisOn();
273    vPlaneWidget->SetResolution(1);
274    vPlaneWidget->SetRepresentationToOutline();
275    //vPlaneWidget->SetInteractor(vIren);
276    vPlaneWidget->SetPlaceFactor(1); //déæini zoom initial
277    vPlaneWidget->PlaceWidget();
278    vPlaneWidget->On();
279
280    vPlaneWidget->GetOrigin(p0);
281    vPlaneWidget->GetCenter(c); //These is fromvtkImageMathematics Execute Method
282    vPlaneWidget->GetNormal(n);
283    vPlaneWidget->GetPoint1(p1);
284    vPlaneWidget->GetPoint2(p2);
285
286    c[0] = c[0]+ bbGetInputMoveX();
287    c[1] = c[1]+ bbGetInputMoveY();
288    c[2] = c[2]+ bbGetInputMoveZ();
289
290    vPlanSource->SetResolution( sizeIma-1,  sizeIma-1);
291    vPlanSource->SetOrigin( p0 );
292    vPlanSource->SetPoint1( p1 );
293    vPlanSource->SetPoint2( p2 );
294    vPlanSource->Update( );
295    vPlanSource->SetNormal( n[ 0 ], n[ 1 ], n[ 2 ] );
296    vPlanSource->Update( );
297    vPlanSource->SetCenter( c );
298    vPlanSource->Update( );
299    
300    vDiskSourceEED->SetInnerRadius (0);
301    vDiskSourceEED->SetOuterRadius (10);
302    vDiskSourceEED->SetRadialResolution (20);
303    vDiskSourceEED->SetCircumferentialResolution (20);
304
305    //Stream Lines
306 //EED 2017-01-01 Migration VTK7
307 #if (VTK_MAJOR_VERSION <= 5) 
308    vPointWidget->SetInput( bbGetInputIn() );
309 #endif
310 #if (VTK_MAJOR_VERSION >= 6) 
311    vPointWidget->SetInputData( bbGetInputIn() );
312 #endif
313
314    vPointWidget->AllOff();
315    vPointWidget->PlaceWidget();
316    //vPointWidget->SetInteractor(vIren);
317    vPointWidget->On();
318    //vPointWidget->GetPolyData(point);
319    vPointWidget->GetPolyData(point);
320    source->SetNumberOfPoints(500);
321    /*
322    tempc = bbGetInputPlaneCenterSL();
323    slCenter[0] = tempc[0];
324    slCenter[1] = tempc[1];
325    slCenter[2] = tempc[2];
326    source->SetCenter(  slCenter );
327    */
328    source->SetCenter(  c );
329    source->SetRadius(5.0);
330    
331 //EED 2017-01-01 Migration VTK7
332 #if (VTK_MAJOR_VERSION <= 5) 
333    streamer->SetInput( bbGetInputIn() );
334    streamer->SetSource(source->GetOutput());
335 #endif
336 #if (VTK_MAJOR_VERSION >= 6) 
337    streamer->SetInputData( bbGetInputIn() );
338    streamer->SetSourceData( source->GetOutput() );
339 #endif
340
341    streamer->SetIntegratorTypeToRungeKutta45();
342    streamer->SetMaximumPropagation(500000);
343 //EED    streamer->SetMaximumPropagationUnitToTimeUnit ();
344    streamer->SetInitialIntegrationStep (0.001);
345 //EED    streamer->SetInitialIntegrationStepUnitToCellLengthUnit();
346    streamer->SetIntegrationDirectionToBoth();
347 //EED   streamer->ComputeVorticityOn ();
348    streamer->Update();
349
350 //EED 2017-01-01 Migration VTK7
351 #if (VTK_MAJOR_VERSION <= 5) 
352    rf->SetInput(streamer->GetOutput());
353 #endif
354 #if (VTK_MAJOR_VERSION >= 6) 
355    rf->SetInputData(streamer->GetOutput());
356 #endif
357
358    rf->SetRadius(.5);
359    rf->SetNumberOfSides(12);
360    rf->SetVaryRadiusToVaryRadiusOff();
361    
362    streamer->GetOutput()->GetScalarRange( range );
363
364 //EED 2017-01-01 Migration VTK7
365 #if (VTK_MAJOR_VERSION <= 5) 
366    streamMapper2->SetInput(rf->GetOutput());
367 #endif
368 #if (VTK_MAJOR_VERSION >= 6) 
369    streamMapper2->SetInputData(rf->GetOutput());
370 #endif
371
372    streamMapper2->SetLookupTable(vGreenToRedLut);
373    //vStreamlineActor2->SetMapper( streamMapper2 );
374    
375    //////////////////////////////////////////////////////////////////////////////////////
376    //Start: Part of the Execute Method
377    //////////////////////////////////////////////////////////////////////////////////////
378    nx=n[0];
379    ny=n[1];
380    nz=n[2];
381    alfa = atan2(ny,nx) * 180.0 / 3.1416;
382    beta = atan2( nz, sqrt( nx*nx + ny*ny )  ) * 180.0 / 3.1416;
383    transformEED->Identity();  
384    transformEED->Translate(c);
385    transformEED->RotateWXYZ(alfa,0,0,1);
386    transformEED->RotateWXYZ(-beta,0,1,0);
387    transformEED->RotateWXYZ(90,0,1,0);
388    transformEED->Update();
389    //////////////////////////////////////////////////////////////////////////////////////
390    //End: Part of the Execute Method
391    //////////////////////////////////////////////////////////////////////////////////////
392
393    vtransformpolydatafilter->SetTransform( transformEED );
394    
395
396 //EED 2017-01-01 Migration VTK7
397 #if (VTK_MAJOR_VERSION <= 5) 
398    vtransformpolydatafilter->SetInput( vDiskSourceEED->GetOutput() );
399    vProbeslices->SetInput( ( vtkDataSet* )vtransformpolydatafilter->GetOutput());
400    vProbeslices->SetSource( bbGetInputIn() ); 
401    vGlyphFlowPlane->SetInput( vProbeslices->GetOutput() );
402    vGlyphFlowPlane->SetSource( vArrowSource->GetOutput() );
403 #endif
404 #if (VTK_MAJOR_VERSION >= 6) 
405    vtransformpolydatafilter->SetInputData( vDiskSourceEED->GetOutput() );
406    vProbeslices->SetInputData( ( vtkDataSet* )vtransformpolydatafilter->GetOutput());
407    vProbeslices->SetSourceData( bbGetInputIn() ); 
408    vGlyphFlowPlane->SetInputData( vProbeslices->GetOutput() );
409         vArrowSource->Update();
410    vGlyphFlowPlane->SetSourceData( vArrowSource->GetOutput() );
411 #endif
412
413    vtransformpolydatafilter->Update();
414    vProbeslices->Update( );
415
416
417    vGlyphFlowPlane->SetScaleModeToScaleByVector();
418    vGlyphFlowPlane->SetColorModeToColorByVector();
419    vGlyphFlowPlane->SetScaleFactor(0.2);
420    vGlyphFlowPlane->Update();
421
422
423 //EED 2017-01-01 Migration VTK7
424 #if (VTK_MAJOR_VERSION <= 5) 
425    vProbeslicesFlowWidget->SetInput( ( vtkDataSet* )vPlanSource->GetOutput());
426    vProbeslicesFlowWidget->SetSource( vVecMagnitude->GetOutput() ); 
427 #endif
428 #if (VTK_MAJOR_VERSION >= 6) 
429    vProbeslicesFlowWidget->SetInputData( ( vtkDataSet* )vPlanSource->GetOutput());
430         vVecMagnitude->Update();
431    vProbeslicesFlowWidget->SetSourceData( vVecMagnitude->GetOutput() ); 
432 #endif
433
434    vProbeslicesFlowWidget->Update( );
435       
436    vVecMagnitude->GetOutput()->GetScalarRange( range );
437
438
439 //EED 2017-01-01 Migration VTK7
440 #if (VTK_MAJOR_VERSION <= 5) 
441    vAppendDataForFlowWidgetVisualisation->AddInput(vGlyphFlowPlane->GetOutput());
442    vAppendDataForFlowWidgetVisualisation->AddInput(vProbeslicesFlowWidget->GetPolyDataOutput());
443    vSliceMapper->SetInput( vAppendDataForFlowWidgetVisualisation->GetOutput());
444 #endif
445 #if (VTK_MAJOR_VERSION >= 6) 
446         vGlyphFlowPlane->Update(); 
447         vProbeslicesFlowWidget->Update(); 
448    vAppendDataForFlowWidgetVisualisation->AddInputData( vGlyphFlowPlane->GetOutput() );
449    vAppendDataForFlowWidgetVisualisation->AddInputData( vProbeslicesFlowWidget->GetPolyDataOutput() );
450    vSliceMapper->SetInputData( vAppendDataForFlowWidgetVisualisation->GetOutput() );
451 #endif
452
453    vSliceMapper->SetScalarRange( range );
454    vSliceMapper->SetLookupTable( vGreenToRedLut );
455    
456    vSliceActor->SetMapper( vSliceMapper );
457
458    if(bbGetInputShowPlane() == 1)
459         {
460       vPlaneWidget->On();
461         } else if(bbGetInputShowPlane() == 0) {
462       vPlaneWidget->Off();
463         }
464
465    vSliceActor->GetProperty()->SetOpacity( bbGetInputShowPlane() );
466
467    exporter->SetInputConnection( vMultipleContourMapper->GetOutputPort() );
468    exporter->ImageLowerLeftOn();
469
470    bbSetOutputOut1( vSliceActor );
471    bbSetOutputOut2( vGlyphActor );
472    bbSetOutputOut3( vOutlineActor );
473    bbSetOutputOut4( vMultipleContourActor );
474
475 //   bbSetOutputOut5( vScalarBarActor );
476
477    if(bbGetInputShowStream() == 1)
478         {
479       vStreamlineActor2->SetMapper( streamMapper2 );
480         }   else {
481       vStreamlineActor2->SetMapper( NULL );
482         }
483    bbSetOutputOut5( vStreamlineActor2 );
484    //bbSetOutputOut5( vStreamlineActor2 );
485    //bbSetOutputOutExport( exporter );
486    //temp->GetData( (vtkInformation*) vMultipleContourVelocity->GetOutput() );
487    //temp->GetData( vMultipleContourMapper->GetOutput() );
488    //bbSetOutputOutTest( temp );
489  } // if
490
491 printf("EED Magnitud::Process End\n");
492
493
494 } // process
495
496
497
498 //===== 
499 // 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)
500 //===== 
501 void Magnitud::bbUserSetDefaultValues()
502 {
503
504 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
505 //    Here we initialize the input 'In' to 0
506 // --------- [
507    bbSetInputIn(NULL);
508    bbSetInputMoveX(0);
509    bbSetInputMoveY(0);
510    bbSetInputMoveZ(0);
511    bbSetInputValSup(1);
512    bbSetInputValInf(0);
513    bbSetInputMRatio(100);
514    bbSetInputOpactity(0.5);
515    bbSetInputScale(0.2);
516    bbSetInputContour(10);
517    bbSetInputShowPlane(1);
518    bbSetInputShowStream(0);
519    //bbSetInputPlaneCenterSL();
520 // --------- ]  
521 }
522 //===== 
523 // 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)
524 //===== 
525 void Magnitud::bbUserInitializeProcessing()
526 {
527
528 //  THE INITIALIZATION METHOD BODY :
529 //    Here does nothing 
530 //    but this is where you should allocate the internal/output pointers 
531 //    if any 
532
533 // ---------- [
534    cone                                         = vtkArrowSource::New();
535    exporter                             = vtkImageExport::New();
536    point                                        = vtkPolyData::New();
537    rf                                           = vtkTubeFilter::New();
538    source                                       = vtkPointSource::New();
539    streamer                             = vtkStreamTracer::New();
540    streamMapper2                        = vtkPolyDataMapper::New();
541    
542    transformEED             = vtkTransform::New();
543    vAppendDataForFlowWidgetVisualisation = vtkAppendPolyData::New();
544    vArrowSource             = vtkArrowSource::New();
545    vDiskSourceEED           = vtkDiskSource::New();
546    vGlyph                   = vtkGlyph3D::New();
547    vGlyphActor              = vtkActor::New();
548    vGlyphFlowPlane          = vtkGlyph3D::New();
549    vGlyphMapper             = vtkPolyDataMapper::New();
550    vGreenToRedLut           = vtkLookupTable::New();
551 //   vIren                    = vtkRenderWindowInteractor::New();
552    vMaskPoint               = vtkMaskPoints::New();
553    vMultipleContourActor    = vtkActor::New();
554    vMultipleContourMapper   = vtkPolyDataMapper::New();
555    vMultipleContourVelocity = vtkContourFilter::New();
556    vOutlineActor            = vtkActor::New();
557    vOutlineGrid             = vtkOutlineFilter::New();
558    vOutlineMapper           = vtkPolyDataMapper::New();
559    vPlanSource              = vtkPlaneSource::New();
560    vPlaneWidget             = vtkPlaneWidget::New();
561    vPointWidget             = vtkPointWidget::New();
562    vProbeslices             = vtkProbeFilter::New();
563    vProbeslicesFlowWidget   = vtkProbeFilter::New();
564    vScalarBarActor          = vtkScalarBarActor::New();
565    vSliceMapper             = vtkPolyDataMapper::New();
566    vSliceActor              = vtkActor::New();
567    vStreamlineActor2        = vtkActor::New();
568    vtransformpolydatafilter = vtkTransformPolyDataFilter::New();
569    vVecMagnitude            = vtkVectorNorm::New();
570
571    temp                     = vtkImageData::New();
572
573    sizeIma = SIZEPLANWIDGET;
574 // ---------- }  
575 }
576 //===== 
577 // 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)
578 //===== 
579 void Magnitud::bbUserFinalizeProcessing()
580 {
581
582 //  THE FINALIZATION METHOD BODY :
583 //    Here does nothing 
584 //    but this is where you should desallocate the internal/output pointers 
585 //    if any
586
587 /// \TODO delete everything no longer needed!
588   
589 }
590 }
591 // EO namespace bbvtk
592
593