]> Creatis software - bbtk.git/blob - packages/vtk/src/bbvtkProbeFilter.cxx
#3301 BBTK Bug New Normal - SurfaceTexture
[bbtk.git] / packages / vtk / src / bbvtkProbeFilter.cxx
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 #include "bbvtkProbeFilter.h"
5 #include "bbvtkPackage.h"
6 namespace bbvtk
7 {
8
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,ProbeFilter)
10 BBTK_BLACK_BOX_IMPLEMENTATION(ProbeFilter,bbtk::AtomicBlackBox);
11 //===== 
12 // 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)
13 //===== 
14 void ProbeFilter::Process()
15 {
16 // THE MAIN PROCESSING METHOD BODY
17 //   Here we simply set the input 'In' value to the output 'Out'
18 //   And print out the output value
19 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
20 //    void bbSet{Input|Output}NAME(const TYPE&)
21 //    const TYPE& bbGet{Input|Output}NAME() const 
22 //    Where :
23 //    * NAME is the name of the input/output
24 //      (the one provided in the attribute 'name' of the tag 'input')
25 //    * TYPE is the C++ type of the input/output
26 //      (the one provided in the attribute 'type' of the tag 'input')
27         if ( (bbGetInputSource()==NULL) || (bbGetInputInput()==NULL)  )
28         {
29                  bbSetOutputOut( NULL ); 
30         } else {
31         //EED 2017-01-01 Migration VTK7
32
33         #if VTK_MAJOR_VERSION <= 5
34                   _probefilter->SetSource( bbGetInputSource() ); 
35                   _probefilter->SetInput( bbGetInputInput() ); 
36         #else
37                   _probefilter->SetSourceData( bbGetInputSource() ); 
38                   _probefilter->SetInputData( bbGetInputInput() ); 
39         #endif
40                   _probefilter->Update();
41                   bbSetOutputOut( _probefilter->GetOutput() );
42         } // if source input
43 }
44 //===== 
45 // 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)
46 //===== 
47 void ProbeFilter::bbUserSetDefaultValues()
48 {
49 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
50 //    Here we initialize the input 'In' to 0
51
52 //   bbSetInputInput(NULL);
53 //   bbSetInputSource(NULL);
54 //   bbSetOutputOut(NULL);
55 }
56 //===== 
57 // 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)
58 //===== 
59 void ProbeFilter::bbUserInitializeProcessing()
60 {
61
62 //  THE INITIALIZATION METHOD BODY :
63 //    Here does nothing 
64 //    but this is where you should allocate the internal/output pointers 
65 //    if any 
66
67     _probefilter = vtkProbeFilter::New();
68   
69
70 }
71 //===== 
72 // 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)
73 //===== 
74 void ProbeFilter::bbUserFinalizeProcessing()
75 {
76
77 //  THE FINALIZATION METHOD BODY :
78 //    Here does nothing 
79 //    but this is where you should desallocate the internal/output pointers 
80 //    if any
81   
82    _probefilter->Delete();
83
84 }
85 }
86 // EO namespace bbvtk
87
88