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)
4 #include "bbcreaVtkImageExtractComponents.h"
5 #include "bbcreaVtkPackage.h"
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(creaVtk,ImageExtractComponents)
10 BBTK_BLACK_BOX_IMPLEMENTATION(ImageExtractComponents,bbtk::AtomicBlackBox);
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)
14 void ImageExtractComponents::Process()
17 // THE MAIN PROCESSING METHOD BODY
18 // Here we simply set the input 'In' value to the output 'Out'
19 // And print out the output value
20 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
21 // void bbSet{Input|Output}NAME(const TYPE&)
22 // const TYPE& bbGet{Input|Output}NAME() const
24 // * NAME is the name of the input/output
25 // (the one provided in the attribute 'name' of the tag 'input')
26 // * TYPE is the C++ type of the input/output
27 // (the one provided in the attribute 'type' of the tag 'input')
29 // bbSetOutputOut( bbGetInputIn() );
30 // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
32 bbSetOutputOut0( NULL );
33 bbSetOutputOut1( NULL );
34 bbSetOutputOut2( NULL );
35 bbSetOutputOut3( NULL );
37 if (bbGetInputComponent0()!=-1)
39 //EED 2017-01-01 Migration VTK7
40 #if VTK_MAJOR_VERSION <= 5
41 IEC0->SetInput( bbGetInputIn() );
43 IEC0->SetInputData( bbGetInputIn() );
45 IEC0->SetComponents( bbGetInputComponent0() );
47 bbSetOutputOut0( IEC0->GetOutput() );
50 if (bbGetInputComponent1()!=-1)
52 //EED 2017-01-01 Migration VTK7
53 #if VTK_MAJOR_VERSION <= 5
54 IEC1->SetInput( bbGetInputIn() );
56 IEC1->SetInputData( bbGetInputIn() );
58 IEC1->SetComponents( bbGetInputComponent1() );
60 bbSetOutputOut1( IEC1->GetOutput() );
63 if (bbGetInputComponent2()!=-1)
65 //EED 2017-01-01 Migration VTK7
66 #if VTK_MAJOR_VERSION <= 5
67 IEC2->SetInput( bbGetInputIn() );
69 IEC2->SetInputData( bbGetInputIn() );
71 IEC2->SetComponents( bbGetInputComponent2() );
73 bbSetOutputOut2( IEC2->GetOutput() );
76 if (bbGetInputComponent3()!=-1)
79 //EED 2017-01-01 Migration VTK7
80 #if VTK_MAJOR_VERSION <= 5
81 IEC3->SetInput( bbGetInputIn() );
83 IEC3->SetInputData( bbGetInputIn() );
85 IEC3->SetComponents( bbGetInputComponent2() );
87 bbSetOutputOut3( IEC3->GetOutput() );
93 // 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)
95 void ImageExtractComponents::bbUserSetDefaultValues()
98 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
99 // Here we initialize the input 'In' to 0
101 bbSetInputComponent0(-1);
102 bbSetInputComponent1(-1);
103 bbSetInputComponent2(-1);
104 bbSetInputComponent3(-1);
108 // 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)
110 void ImageExtractComponents::bbUserInitializeProcessing()
113 // THE INITIALIZATION METHOD BODY :
115 // but this is where you should allocate the internal/output pointers
118 IEC0=vtkImageExtractComponents::New();
119 IEC1=vtkImageExtractComponents::New();
120 IEC2=vtkImageExtractComponents::New();
121 IEC3=vtkImageExtractComponents::New();
124 // 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)
126 void ImageExtractComponents::bbUserFinalizeProcessing()
129 // THE FINALIZATION METHOD BODY :
131 // but this is where you should desallocate the internal/output pointers
143 // EO namespace bbcreaVtk