Slicer  5.3
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
itkDiffusionTensor3DWrite.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 itkDiffusionTensor3DWrite_h
15 #define itkDiffusionTensor3DWrite_h
16 
17 #include <itkObject.h>
18 #include <itkMetaDataObject.h>
19 #include <itkImage.h>
20 #include <itkMatrix.h>
21 #include <itkImageFileWriter.h>
22 #include <itkNrrdImageIO.h>
23 #include <itkImageIOBase.h>
24 #include "itkDiffusionTensor3D.h"
25 
26 namespace itk
27 {
28 
33 template <class TData>
34 class DiffusionTensor3DWrite : public Object
35 {
36 public:
37  typedef TData DataType;
39  typedef DiffusionTensor3D<DataType> TensorDataType;
40  typedef Image<TensorDataType, 3> DiffusionImageType;
41  typedef MetaDataDictionary DictionaryType;
42  typedef ImageFileWriter<DiffusionImageType> WriterType;
43  typedef SmartPointer<Self> Pointer;
44  typedef SmartPointer<const Self> ConstPointer;
45  typedef std::vector<std::vector<double> > DoubleVectorType;
46  typedef MetaDataObject<DoubleVectorType> MetaDataDoubleVectorType;
47  typedef MetaDataObject<std::string> MetaDataIntType;
48 
51 
52  itkNewMacro( Self );
53  // /Set input tensor image
55  // /Write the image in the given file
56  int Update( const char* output );
57 
58  // /Set the metadatadictionary of the image, including its measurement frame
60 
61  // /Set Number of Threads
62  itkSetMacro( NumberOfThreads, unsigned int);
68  void SetMeasurementFrame( Matrix<double, 3, 3> measurementFrame );
69 
70 // Space:
71 // nrrdSpaceUnknown,
72 // nrrdSpaceRightAnteriorSuperior, /* 1: NIFTI-1 (right-handed) */
73 // nrrdSpaceLeftAnteriorSuperior, /* 2: standard Analyze (left-handed) */
74 // nrrdSpaceLeftPosteriorSuperior, /* 3: DICOM 3.0 (right-handed) */
75 // nrrdSpaceRightAnteriorSuperiorTime, /* 4: */
76 // nrrdSpaceLeftAnteriorSuperiorTime, /* 5: */
77 // nrrdSpaceLeftPosteriorSuperiorTime, /* 6: */
78 // nrrdSpaceScannerXYZ, /* 7: ACR/NEMA 2.0 (pre-DICOM 3.0) */
79 // nrrdSpaceScannerXYZTime, /* 8: */
80 // nrrdSpace3DRightHanded, /* 9: */
81 // nrrdSpace3DLeftHanded, /* 10: */
82 // nrrdSpace3DRightHandedTime, /* 11: */
83 // nrrdSpace3DLeftHandedTime, /* 12: */
84 // nrrdSpaceLast
85  void SetSpace(int space);
86 
87 private:
89 
90  typename DiffusionImageType::Pointer m_Input;
91 
92  unsigned int m_NumberOfThreads;
93  DictionaryType m_MetaDataDictionary;
94 };
95 
96 } // end namespace itk
97 
98 #ifndef ITK_MANUAL_INSTANTIATION
99 #include "itkDiffusionTensor3DWrite.txx"
100 #endif
101 
102 #endif
itkSetMacro(NumberOfThreads, unsigned int)
Image< TensorDataType, 3 > DiffusionImageType
ImageFileWriter< DiffusionImageType > WriterType
Simplified inverse ITK transforms.
void SetMeasurementFrame(Matrix< double, 3, 3 > measurementFrame)
DiffusionTensor3D< DataType > TensorDataType
void SetMetaDataDictionary(DictionaryType dic)
itkSetObjectMacro(Input, DiffusionImageType)
SmartPointer< const Self > ConstPointer
std::vector< std::vector< double > > DoubleVectorType
int Update(const char *output)
MetaDataObject< DoubleVectorType > MetaDataDoubleVectorType
MetaDataObject< std::string > MetaDataIntType
itkTypeMacro(DiffusionTensor3DWrite, Object)