]> Creatis software - bbtk.git/blob - packages/gdcmvtk/src/bbgdcmvtkGetInfoGdcmReader.h
remove tabs
[bbtk.git] / packages / gdcmvtk / src / bbgdcmvtkGetInfoGdcmReader.h
1 #ifdef _USE_VTK_
2
3 #ifndef __bbgdcmvtkGetInfoGdcmReader_h_INCLUDED__
4 #define __bbgdcmvtkGetInfoGdcmReader_h_INCLUDED__
5
6 #include "bbgdcmvtk_EXPORT.h"
7 #include "bbtkAtomicBlackBox.h"
8 #include "iostream"
9
10 #include "vtkGdcmReader.h"
11
12 namespace bbgdcmvtk
13 {
14
15 class bbgdcmvtk_EXPORT GetInfoGdcmReader
16  : 
17    public bbtk::AtomicBlackBox
18 {
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 //==================================================================
28
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);
35        
36   BBTK_PROCESS(Process);
37   void Process();
38   
39   private:
40      GDCM_NAME_SPACE::File *f;
41      vtkGdcmReader *reader;
42 };
43
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)");
50 BBTK_CATEGORY("");
51
52 BBTK_INPUT(GetInfoGdcmReader,In,"Dicom image file name",std::string,"");
53
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
61
62 #endif // __bbgdcmvtkGetInfoGdcmReader_h_INCLUDED__
63
64 #endif //_USE_VTK_