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 IEC0->SetInput( bbGetInputIn() );
40 IEC0->SetComponents( bbGetInputComponent0() );
42 bbSetOutputOut0( IEC0->GetOutput() );
45 if (bbGetInputComponent1()!=-1)
47 IEC1->SetInput( bbGetInputIn() );
48 IEC1->SetComponents( bbGetInputComponent1() );
50 bbSetOutputOut1( IEC1->GetOutput() );
53 if (bbGetInputComponent2()!=-1)
55 IEC2->SetInput( bbGetInputIn() );
56 IEC2->SetComponents( bbGetInputComponent2() );
58 bbSetOutputOut2( IEC2->GetOutput() );
61 if (bbGetInputComponent3()!=-1)
63 IEC3->SetInput( bbGetInputIn() );
64 IEC3->SetComponents( bbGetInputComponent2() );
66 bbSetOutputOut3( IEC3->GetOutput() );
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)
74 void ImageExtractComponents::bbUserSetDefaultValues()
77 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
78 // Here we initialize the input 'In' to 0
80 bbSetInputComponent0(-1);
81 bbSetInputComponent1(-1);
82 bbSetInputComponent2(-1);
83 bbSetInputComponent3(-1);
87 // 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)
89 void ImageExtractComponents::bbUserInitializeProcessing()
92 // THE INITIALIZATION METHOD BODY :
94 // but this is where you should allocate the internal/output pointers
97 IEC0=vtkImageExtractComponents::New();
98 IEC1=vtkImageExtractComponents::New();
99 IEC2=vtkImageExtractComponents::New();
100 IEC3=vtkImageExtractComponents::New();
103 // 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)
105 void ImageExtractComponents::bbUserFinalizeProcessing()
108 // THE FINALIZATION METHOD BODY :
110 // but this is where you should desallocate the internal/output pointers
122 // EO namespace bbcreaVtk