1 #include "bbvtkImageCastToUShort.h"
2 #include "bbvtkPackage.h"
6 BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,ImageCastToUShort)
7 BBTK_BLACK_BOX_IMPLEMENTATION(ImageCastToUShort,bbtk::AtomicBlackBox);
8 void ImageCastToUShort::Process()
11 // THE MAIN PROCESSING METHOD BODY
12 // Here we simply set the input 'In' value to the output 'Out'
13 // And print out the output value
14 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
15 // void bbSet{Input|Output}NAME(const TYPE&)
16 // const TYPE& bbGet{Input|Output}NAME() const
18 // * NAME is the name of the input/output
19 // (the one provided in the attribute 'name' of the tag 'input')
20 // * TYPE is the C++ type of the input/output
21 // (the one provided in the attribute 'type' of the tag 'input')
23 vtkImageData* img = bbGetInputIn();
25 cast->SetOutputScalarTypeToUnsignedShort();
27 bbSetOutputOut(cast->GetOutput() );
30 void ImageCastToUShort::bbUserSetDefaultValues()
33 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
34 // Here we initialize the input 'In' to 0
39 void ImageCastToUShort::bbUserInitializeProcessing()
42 // THE INITIALIZATION METHOD BODY :
44 // but this is where you should allocate the internal/output pointers
47 cast = vtkImageCast::New();
50 void ImageCastToUShort::bbUserFinalizeProcessing()
53 // THE FINALIZATION METHOD BODY :
55 // but this is where you should desallocate the internal/output pointers