Slicer 4.2
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.
00001 /*=========================================================================
00002 
00003   Program:   Diffusion Applications
00004   Module:    $HeadURL: http://svn.slicer.org/Slicer4/trunk/Modules/CLI/ResampleDTIVolume/itkDiffusionTensor3DWrite.h $
00005   Language:  C++
00006   Date:      $Date: 2012-02-02 01:52:52 -0500 (Thu, 02 Feb 2012) $
00007   Version:   $Revision: 19197 $
00008 
00009   Copyright (c) Brigham and Women's Hospital (BWH) All Rights Reserved.
00010 
00011   See License.txt or http://www.slicer.org/copyright/copyright.txt for details.
00012 
00013 ==========================================================================*/
00014 #ifndef __itkDiffusionTensor3DWrite_h
00015 #define __itkDiffusionTensor3DWrite_h
00016 
00017 #include <itkObject.h>
00018 #include <itkMetaDataObject.h>
00019 #include <itkImage.h>
00020 #include <itkMatrix.h>
00021 #include <itkImageFileWriter.h>
00022 #include <itkNrrdImageIO.h>
00023 #include <itkImageIOBase.h>
00024 #include "itkDiffusionTensor3D.h"
00025 
00026 namespace itk
00027 {
00028 
00033 template <class TData>
00034 class DiffusionTensor3DWrite : public Object
00035 {
00036 public:
00037   typedef TData                               DataType;
00038   typedef DiffusionTensor3DWrite              Self;
00039   typedef DiffusionTensor3D<DataType>         TensorDataType;
00040   typedef Image<TensorDataType, 3>            DiffusionImageType;
00041   typedef MetaDataDictionary                  DictionaryType;
00042   typedef ImageFileWriter<DiffusionImageType> WriterType;
00043   typedef SmartPointer<Self>                  Pointer;
00044   typedef SmartPointer<const Self>            ConstPointer;
00045   typedef std::vector<std::vector<double> >   DoubleVectorType;
00046   typedef MetaDataObject<DoubleVectorType>    MetaDataDoubleVectorType;
00047   typedef MetaDataObject<std::string>         MetaDataIntType;
00048   itkNewMacro( Self );
00049   // /Set input tensor image
00050   itkSetObjectMacro( Input, DiffusionImageType );
00051   // /Write the image in the given file
00052   int Update( const char* output );
00053 
00054   // /Set the metadatadictionary of the image, including its measurement frame
00055   void SetMetaDataDictionary( DictionaryType dic );
00056 
00057   // /Set Number of Threads
00058   itkSetMacro( NumberOfThreads, unsigned int);
00064   void SetMeasurementFrame( Matrix<double, 3, 3> measurementFrame );
00065 
00066 //  Space:
00067 //  nrrdSpaceUnknown,
00068 //  nrrdSpaceRightAnteriorSuperior,     /*  1: NIFTI-1 (right-handed) */
00069 //  nrrdSpaceLeftAnteriorSuperior,      /*  2: standard Analyze (left-handed) */
00070 //  nrrdSpaceLeftPosteriorSuperior,     /*  3: DICOM 3.0 (right-handed) */
00071 //  nrrdSpaceRightAnteriorSuperiorTime, /*  4: */
00072 //  nrrdSpaceLeftAnteriorSuperiorTime,  /*  5: */
00073 //  nrrdSpaceLeftPosteriorSuperiorTime, /*  6: */
00074 //  nrrdSpaceScannerXYZ,                /*  7: ACR/NEMA 2.0 (pre-DICOM 3.0) */
00075 //  nrrdSpaceScannerXYZTime,            /*  8: */
00076 //  nrrdSpace3DRightHanded,             /*  9: */
00077 //  nrrdSpace3DLeftHanded,              /* 10: */
00078 //  nrrdSpace3DRightHandedTime,         /* 11: */
00079 //  nrrdSpace3DLeftHandedTime,          /* 12: */
00080 //  nrrdSpaceLast
00081   void SetSpace(int space);
00082 
00083 private:
00084   DiffusionTensor3DWrite();
00085   typename DiffusionImageType::Pointer m_Input;
00086   unsigned int   m_NumberOfThreads;
00087   DictionaryType m_MetaDataDictionary;
00088 };
00089 
00090 } // end namespace itk
00091 
00092 #ifndef ITK_MANUAL_INSTANTIATION
00093 #include "itkDiffusionTensor3DWrite.txx"
00094 #endif
00095 
00096 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines