Tomato
OxOriginalShmolliDicomReader.h
Go to the documentation of this file.
1 
7 #ifndef Tomato_OxOriginalShmolliDicomReader_H
8 #define Tomato_OxOriginalShmolliDicomReader_H
9 
10 #include "CmakeConfigForTomato.h"
11 #include "tomatolib_export.h"
12 
13 #ifdef USE_ITK
14 
15 #include "itkReadFileListFilter.h"
16 #include "itkSortInvTimesImageFilter.h"
17 #include "itkExtractImageFilter.h"
18 
19 namespace Ox {
20 
25  template< typename MeasureType >
26  class OriginalShmolliDicomReader {
27 
28  public:
29  // typedefs primitive data types
30  typedef MeasureType InputPixelType;
31  typedef MeasureType OutputPixelType;
32 
33  // typedefs image data types
34  typedef itk::Image<InputPixelType, 3> Image3dType;
35  typedef itk::Image<OutputPixelType, 2> Image2dType;
36  typedef itk::ReadFileListFilter<Image3dType> ReadFileListFilterType;
37  typedef itk::SortInvTimesImageFilter<Image3dType, Image3dType> SortInvTimesImageFilterType;
38 
39  // member variables
40  InputPixelType *_invTimes;
41  InputPixelType *_echoTimes;
42  int _nSamples;
43  typename Image3dType::Pointer _imageMag;
44  typename Image3dType::Pointer _imagePha;
45  typename Image2dType::Pointer _imageT1grey;
46  typename Image2dType::Pointer _imageT1color;
47  typename Image2dType::Pointer _imageR2;
48  typename Image2dType::Pointer _imageA;
49  typename Image2dType::Pointer _imageB;
50  typename Image2dType::Pointer _imageT1star;
51  typename Image2dType::Pointer _imageNShmolliSamplesUsed;
52  typename Image2dType::Pointer _imageChiSqrt;
53  typename Image2dType::Pointer _imageSnr;
54 
55  std::vector<std::string> _filesMag;
56  std::vector<std::string> _filesPha;
57  std::vector<std::string> _filesT1;
58  std::vector<std::string> _filesFitparams;
59 
64  int readAndSort();
65 
66  int copyFromImage(MeasureType* array, const typename Image3dType::Pointer image, const typename Image3dType::IndexType index);
67 
72  OriginalShmolliDicomReader(){
73  _invTimes = 0;
74  _echoTimes = 0;
75  _nSamples = 0;
76  _imageMag = 0;
77  _imagePha = 0;
78  _imageT1grey = 0;
79  _imageT1color = 0;
80  _imageA = 0;
81  _imageB = 0;
82  _imageT1star = 0;
83  _imageNShmolliSamplesUsed = 0;
84  _imageChiSqrt = 0;
85  _imageSnr = 0;
86  };
87 
92  virtual ~OriginalShmolliDicomReader(){
93  delete [] _invTimes;
94  };
95  };
96 
97 } // namespace Ox
98 
99 #ifndef TOMATOLIB_COMPILED
101 #endif //TOMATOLIB_COMPILED
102 
103 #endif
104 
105 #endif //Tomato_OxOriginalShmolliDicomReader_H
Definition: OxCalculator.h:19