00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date: 2009-07-14 19:11:20 +0200 (Tue, 14 Jul 2009) $ 00006 Version: $Revision: 18127 $ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 #ifndef __mitkDicomDiffusionImageReader_h 00019 #define __mitkDicomDiffusionImageReader_h 00020 00021 #include "itkImageSource.h" 00022 #include "itkVectorImage.h" 00023 #include "mitkDiffusionImageHeaderInformation.h" 00024 #include "itkDataObject.h" 00025 #include "mitkCommon.h" 00026 00027 //#include "itkImageIOBase.h" 00028 //#include "itkExceptionObject.h" 00029 //#include "itkSize.h" 00030 //#include "itkImageRegion.h" 00031 //#include <vector> 00032 //#include <string> 00033 //#include "itkMetaDataDictionary.h" 00034 00035 namespace mitk 00036 { 00037 00041 template <class TPixelType, const int TDimension> 00042 class DicomDiffusionImageReader : public itk::ImageSource< itk::VectorImage< TPixelType, TDimension > > 00043 { 00044 public: 00045 00046 typedef itk::VectorImage< TPixelType, TDimension > OutputImageType; 00047 typedef itk::Image<TPixelType, TDimension > InputImageType; 00048 typedef itk::ImageSource< OutputImageType > ImageSourceType; 00049 00050 mitkClassMacro( DicomDiffusionImageReader, ImageSourceType ); 00051 itkNewMacro(Self); 00052 00053 00055 typedef typename OutputImageType::SizeType SizeType; 00056 00058 typedef typename OutputImageType::RegionType ImageRegionType; 00059 00061 //typedef MetaDataDictionary DictionaryType; 00062 //typedef MetaDataDictionary * DictionaryRawPointer; 00063 //typedef std::vector< DictionaryRawPointer > DictionaryArrayType; 00064 //typedef const DictionaryArrayType * DictionaryArrayRawPointer; 00065 00066 typedef std::vector<DiffusionImageHeaderInformation::Pointer> HeaderContainer; 00067 00070 void SetHeaders (const HeaderContainer &headers) 00071 { 00072 if ( m_Headers != headers) 00073 { 00074 m_Headers = headers; 00075 this->Modified(); 00076 } 00077 } 00078 const HeaderContainer & GetHeaders() const 00079 { 00080 return m_Headers; 00081 } 00082 00085 virtual void GenerateOutputInformation(void); 00086 00092 virtual void EnlargeOutputRequestedRegion(itk::DataObject *output); 00093 00095 //DictionaryArrayRawPointer GetMetaDataDictionaryArray() const; 00096 00097 protected: 00098 //DicomDiffusionImageReader(); 00099 //~DicomDiffusionImageReader(); 00100 00101 void PrintSelf(std::ostream& os, itk::Indent indent) const; 00102 00104 virtual void GenerateData(); 00105 00107 HeaderContainer m_Headers; 00108 00111 int m_NumberOfDimensionsInImage; 00112 00115 //DictionaryArrayType m_MetaDataDictionaryArray; 00116 00117 private: 00118 //DicomDiffusionImageReader(const Self&); //purposely not implemented 00119 void operator=(const Self&); //purposely not implemented 00120 }; 00121 00122 } //namespace MITK 00123 00124 #include "mitkDicomDiffusionImageReader.cpp" 00125 00126 #endif // __mitkDicomDiffusionImageReader_h