3 #ifndef __bbgdcmvtkGetInfoGdcmReader_h_INCLUDED__
4 #define __bbgdcmvtkGetInfoGdcmReader_h_INCLUDED__
6 #include "bbgdcmvtk_EXPORT.h"
7 #include "bbtkAtomicBlackBox.h"
10 #include "vtkGdcmReader.h"
15 class bbgdcmvtk_EXPORT GetInfoGdcmReader
17 public bbtk::AtomicBlackBox
19 BBTK_BLACK_BOX_INTERFACE(GetInfoGdcmReader,bbtk::AtomicBlackBox);
20 //==================================================================
21 /// User callback called in the box contructor
22 virtual void bbUserConstructor();
23 /// User callback called in the box copy constructor
24 virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
25 /// User callback called in the box destructor
26 virtual void bbUserDestructor();
27 //==================================================================
29 BBTK_DECLARE_INPUT(In, std::string);
30 BBTK_DECLARE_OUTPUT(Out, vtkImageData *);
31 BBTK_DECLARE_OUTPUT(IPP, std::vector<double>);
32 BBTK_DECLARE_OUTPUT(IOP, std::vector<double>);
33 BBTK_DECLARE_OUTPUT(PixelSpacing, std::vector<double>);
34 BBTK_DECLARE_OUTPUT(InterSlice, double);
36 BBTK_PROCESS(Process);
40 GDCM_NAME_SPACE::File *f;
41 vtkGdcmReader *reader;
44 //=================================================================
45 // UserBlackBox description
46 BBTK_BEGIN_DESCRIBE_BLACK_BOX(GetInfoGdcmReader,bbtk::AtomicBlackBox);
47 BBTK_NAME("GetInfoGdcmReader");
48 BBTK_AUTHOR("jpr, eduardo");
49 BBTK_DESCRIPTION("Get Dicom info and read (as a vtkImageData)");
52 BBTK_INPUT(GetInfoGdcmReader,In,"Dicom image file name",std::string,"");
54 BBTK_OUTPUT(GetInfoGdcmReader,Out, "Output image", vtkImageData *,"");
55 BBTK_OUTPUT(GetInfoGdcmReader,IPP, "Image Position (Patient)", std::vector<double>,"");
56 BBTK_OUTPUT(GetInfoGdcmReader,IOP, "Image Orientation (Patient)", std::vector<double>,"");
57 BBTK_OUTPUT(GetInfoGdcmReader,PixelSpacing,"Pixel Spacing", std::vector<double>,"");
58 BBTK_OUTPUT(GetInfoGdcmReader,InterSlice, "InterSlice", double,"");
59 BBTK_END_DESCRIBE_BLACK_BOX(GetInfoGdcmReader);
60 } // EO namespace bbgdcmvtk
62 #endif // __bbgdcmvtkGetInfoGdcmReader_h_INCLUDED__