]> Creatis software - bbtk.git/blob - packages/gdcmvtk/src/bbgdcmvtkGetXCoherentInfoGdcmReader.h
Try to get more accurate info from SerieHelper
[bbtk.git] / packages / gdcmvtk / src / bbgdcmvtkGetXCoherentInfoGdcmReader.h
1 #ifdef _USE_VTK_
2
3 #ifndef __bbgdcmvtkGetXCoherentInfoGdcmReader_h_INCLUDED__
4 #define __bbgdcmvtkGetXCoherentInfoGdcmReader_h_INCLUDED__
5
6 #include "bbgdcmvtk_EXPORT.h"
7 #include "bbtkAtomicBlackBox.h"
8 #include "iostream"
9
10 #include "vtkGdcmReader.h"
11 #include "gdcmFile.h"
12 #include "gdcmSerieHelper.h"
13
14 namespace bbgdcmvtk
15 {
16
17 class bbgdcmvtk_EXPORT GetXCoherentInfoGdcmReader
18  : 
19    public bbtk::AtomicBlackBox
20 {
21   BBTK_BLACK_BOX_INTERFACE(GetXCoherentInfoGdcmReader,bbtk::AtomicBlackBox);
22 //==================================================================
23 /// User callback called in the box contructor
24 virtual void bbUserConstructor();
25 /// User callback called in the box copy constructor
26 virtual void bbUserCopyConstructor(bbtk::BlackBox::Pointer);
27 /// User callback called in the box destructor
28 virtual void bbUserDestructor();
29 //==================================================================
30
31   BBTK_DECLARE_INPUT(In,            std::vector<std::string>);
32   BBTK_DECLARE_OUTPUT(Out,          vtkImageData *);
33   BBTK_DECLARE_OUTPUT(IPP,          std::vector<double>);
34   BBTK_DECLARE_OUTPUT(IOP,          std::vector<double>);
35   BBTK_DECLARE_OUTPUT(PixelSpacing, std::vector<double>);
36   BBTK_DECLARE_OUTPUT(InterSlice,   double);
37        
38   BBTK_PROCESS(Process);
39   void Process();
40   
41   private:
42      GDCM_NAME_SPACE::File *f;
43      GDCM_NAME_SPACE::SerieHelper *sh;
44      vtkGdcmReader *reader;
45 };
46
47   //=================================================================
48   // UserBlackBox description
49 BBTK_BEGIN_DESCRIBE_BLACK_BOX(GetXCoherentInfoGdcmReader,bbtk::AtomicBlackBox);
50 BBTK_NAME("GetXCoherentInfoGdcmReader");
51 BBTK_AUTHOR("jpr, eduardo");
52 BBTK_DESCRIPTION("Get Dicom info from a File Set and read (as a vtkImageData)");
53 BBTK_CATEGORY("");
54
55 BBTK_INPUT(GetXCoherentInfoGdcmReader,In,"Dicom image file name",std::vector<std::string>,"");
56
57 BBTK_OUTPUT(GetXCoherentInfoGdcmReader,Out,         "Output image",                vtkImageData *,"");
58 BBTK_OUTPUT(GetXCoherentInfoGdcmReader,IPP,         "Image Position (Patient)",    std::vector<double>,"");
59 BBTK_OUTPUT(GetXCoherentInfoGdcmReader,IOP,         "Image Orientation (Patient)", std::vector<double>,"");
60 BBTK_OUTPUT(GetXCoherentInfoGdcmReader,PixelSpacing,"Pixel Spacing",               std::vector<double>,"");
61 BBTK_OUTPUT(GetXCoherentInfoGdcmReader,InterSlice,  "InterSlice",                  double,"");
62 BBTK_END_DESCRIBE_BLACK_BOX(GetXCoherentInfoGdcmReader);
63 } // EO namespace bbgdcmvtk
64
65 #endif // __bbgdcmvtkGetXCoherentInfoGdcmReader_h_INCLUDED__
66
67 #endif //_USE_VTK_