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 "bbvtkMetaImageReader.h"
5 #include "bbvtkPackage.h"
7 #include "vtkMetaImageReader.h"
12 BBTK_ADD_BLACK_BOX_TO_PACKAGE(vtk,MetaImageReader)
13 BBTK_BLACK_BOX_IMPLEMENTATION(MetaImageReader,bbtk::AtomicBlackBox);
16 void MetaImageReader::Read_mhdb( std::string filename )
18 printf("EED MetaImageReader::Read_mhdb \n");
23 // 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)
25 void MetaImageReader::Process()
28 // THE MAIN PROCESSING METHOD BODY
29 // Here we simply set the input 'In' value to the output 'Out'
30 // And print out the output value
31 // INPUT/OUTPUT ACCESSORS ARE OF THE FORM :
32 // void bbSet{Input|Output}NAME(const TYPE&)
33 // const TYPE& bbGet{Input|Output}NAME() const
35 // * NAME is the name of the input/output
36 // (the one provided in the attribute 'name' of the tag 'input')
37 // * TYPE is the C++ type of the input/output
38 // (the one provided in the attribute 'type' of the tag 'input')
40 // bbSetOutputOut( bbGetInputIn() );
41 // std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
43 if (bbGetInputIn().substr(bbGetInputIn().size()-5) == ".mhdb")
45 Read_mhdb( bbGetInputIn() );
47 FILE *ff = fopen( bbGetInputIn().c_str() , "r" );
51 vtkMetaImageReader *reader = vtkMetaImageReader::New();
52 reader->SetFileName( bbGetInputIn().c_str() );
54 bbSetOutputOut( reader->GetOutput() );
62 // 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)
64 void MetaImageReader::bbUserSetDefaultValues()
67 // SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX
68 // Here we initialize the input 'In' to 0
73 // 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)
75 void MetaImageReader::bbUserInitializeProcessing()
78 // THE INITIALIZATION METHOD BODY :
80 // but this is where you should allocate the internal/output pointers
86 // 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)
88 void MetaImageReader::bbUserFinalizeProcessing()
91 // THE FINALIZATION METHOD BODY :
93 // but this is where you should desallocate the internal/output pointers