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 "bbvtkExtractVtkImageFilter.h"
5 #include "bbvtkPackage.h"
9 BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,ExtractVtkImageFilter)
10 BBTK_BLACK_BOX_IMPLEMENTATION(ExtractVtkImageFilter,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 ExtractVtkImageFilter::Process()
18 voi[0] = bbGetInputIndex()[0];
19 voi[1] = bbGetInputIndex()[0]+bbGetInputSize()[0]-1;
20 voi[2] = bbGetInputIndex()[1];
21 voi[3] = bbGetInputIndex()[1]+bbGetInputSize()[1]-1;
22 voi[4] = bbGetInputIndex()[2];
23 voi[5] = bbGetInputIndex()[2]+bbGetInputSize()[2]-1;
25 _extract->SetInput( bbGetInputIn() );
26 _extract->SetVOI(voi);
27 _extract->UpdateWholeExtent();
29 bbSetOutputOut(_extract->GetOutput());
33 // 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)
35 void ExtractVtkImageFilter::bbUserSetDefaultValues()
38 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
39 // Here we initialize the input 'In' to 0
45 std::vector<int> tmpIndex;
46 tmpIndex.push_back(0);
47 tmpIndex.push_back(0);
48 tmpIndex.push_back(0);
49 std::vector<int> tmpSize;
53 bbSetInputIndex(tmpIndex);
54 bbSetInputSize(tmpSize);
60 // 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)
62 void ExtractVtkImageFilter::bbUserInitializeProcessing()
65 // THE INITIALIZATION METHOD BODY :
67 // but this is where you should allocate the internal/output pointers
69 _extract = vtkExtractVOI::New();
74 // 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)
76 void ExtractVtkImageFilter::bbUserFinalizeProcessing()
79 // THE FINALIZATION METHOD BODY :
81 // but this is where you should desallocate the internal/output pointers