Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
itkDiffusionTensor3DRead.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Diffusion Applications
4  Module: $HeadURL$
5  Language: C++
6  Date: $Date$
7  Version: $Revision$
8 
9  Copyright (c) Brigham and Women's Hospital (BWH) All Rights Reserved.
10 
11  See License.txt or http://www.slicer.org/copyright/copyright.txt for details.
12 
13 ==========================================================================*/
14 #ifndef itkDiffusionTensor3DRead_h
15 #define itkDiffusionTensor3DRead_h
16 
17 #include <itkObject.h>
18 #include <itkMetaDataObject.h>
19 #include <itkImage.h>
20 #include <itkMatrix.h>
21 #include <itkImageFileReader.h>
22 #include <itkNrrdImageIO.h>
23 #include <itkImageIOBase.h>
24 #include <itkDiffusionTensor3D.h>
25 
26 namespace itk
27 {
28 
34 template <class TData>
35 class ITK_ABI_EXPORT DiffusionTensor3DRead : public Object
36 {
37 public:
38  typedef TData DataType;
40  typedef Matrix<double, 3, 3> MatrixType;
41  typedef DiffusionTensor3D<DataType> TensorDataType;
42  typedef Image<TensorDataType, 3> DiffusionImageType;
43  typedef typename DiffusionImageType::Pointer DiffusionImagePointer;
44  typedef ImageFileReader<DiffusionImageType> FileReaderType;
45  typedef MetaDataDictionary DictionaryType;
46  typedef MetaDataObject<std::string> MetaDataStringType;
47  typedef std::vector<std::vector<double> > DoubleVectorType;
48  typedef MetaDataObject<DoubleVectorType> MetaDataDoubleVectorType;
49  typedef SmartPointer<Self> Pointer;
50  typedef SmartPointer<const Self> ConstPointer;
51 
53  itkTypeMacro(DiffusionTensor3DRead, Object);
54 
55  itkNewMacro( Self );
56  int Update( const char* input );
57 
58  // /Get the measurement frame of the image
59  itkGetMacro( MeasurementFrame, MatrixType);
60  // /Get the MetaDataDictionary of the image
61  DictionaryType GetMetaDataDictionary() const;
62 
63  // /Get the output of the reader, the pixels of the image being of the DiffusionTensor3D type
64  DiffusionImagePointer GetOutput() const;
65 
66  // /Set Number Of Threads
67  itkSetMacro( NumberOfThreads, unsigned int);
68  itkGetMacro( HasMeasurementFrame , bool );
69 private:
71 
72  typename FileReaderType::Pointer m_Reader;
73 
74  MatrixType m_MeasurementFrame;
75  unsigned int m_NumberOfThreads;
76  bool m_HasMeasurementFrame;
77 };
78 
79 } // end namespace itk
80 
81 #ifndef ITK_MANUAL_INSTANTIATION
82 #include "itkDiffusionTensor3DRead.txx"
83 #endif
84 
85 #endif
SmartPointer< const Self > ConstPointer
Simplified inverse ITK transforms.
std::vector< std::vector< double > > DoubleVectorType
Matrix< double, 3, 3 > MatrixType
MetaDataObject< std::string > MetaDataStringType
MetaDataObject< DoubleVectorType > MetaDataDoubleVectorType
Image< TensorDataType, 3 > DiffusionImageType
DiffusionTensor3D< DataType > TensorDataType
DiffusionImageType::Pointer DiffusionImagePointer
ImageFileReader< DiffusionImageType > FileReaderType