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