00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkBruker2DSEQImageIO.h,v $ 00005 Language: C++ 00006 Date: $Date: 2008-06-23 22:04:35 $ 00007 Version: $Revision: 1.4 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm 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 00035 #ifndef __itkBruker2DSEQImageIO_h 00036 #define __itkBruker2DSEQImageIO_h 00037 00038 #ifdef _MSC_VER 00039 #pragma warning ( disable : 4786 ) 00040 #endif 00041 00042 #include "itkImageIOBase.h" 00043 #include "itkVectorContainer.h" 00044 00045 namespace itk 00046 { 00114 class ITK_EXPORT Bruker2DSEQImageIO : public ImageIOBase 00115 { 00116 public: 00118 typedef Bruker2DSEQImageIO Self; 00119 typedef ImageIOBase Superclass; 00120 typedef SmartPointer<Self> Pointer; 00121 00123 itkNewMacro(Self); 00124 00126 itkTypeMacro(Bruker2DSEQImageIO, Superclass); 00127 00129 typedef VectorContainer< unsigned int, double > RECOFOVContainerType; 00130 typedef VectorContainer< unsigned int, int > RECOTranspositionContainerType; 00131 typedef VectorContainer< unsigned int, double > ACQEchoTimeContainerType; 00132 typedef VectorContainer< unsigned int, double > ACQRepetitionTimeContainerType; 00133 typedef VectorContainer< unsigned int, double > ACQInversionTimeContainerType; 00134 typedef VectorContainer< unsigned int, double > ACQSliceSepnContainerType; 00135 00136 /*-------- This part of the interfaces deals with reading data. ----- */ 00137 00143 virtual bool CanReadFile(const char* FileNameToRead); 00144 00146 virtual void ReadImageInformation(); 00147 00149 virtual void Read(void* buffer); 00150 00151 /*-------- This part of the interfaces deals with writing data. ----- */ 00152 00159 virtual bool CanWriteFile( const char * itkNotUsed(FileNameToWrite) ) 00160 { 00161 return false; 00162 } 00163 00165 virtual void WriteImageInformation() 00166 { 00167 return; 00168 } 00169 00172 virtual void Write( const void * itkNotUsed( buffer ) ) 00173 { 00174 return; 00175 } 00176 00177 00178 protected: 00179 Bruker2DSEQImageIO(); 00180 ~Bruker2DSEQImageIO(); 00181 void PrintSelf(std::ostream& os, Indent indent) const; 00182 00183 private: 00184 00185 Bruker2DSEQImageIO(const Self&); //purposely not implemented 00186 void operator=(const Self&); //purposely not implemented 00187 void SwapBytesIfNecessary(void * buffer, unsigned long numberOfPixels); 00188 00189 ImageIOBase::ByteOrder m_MachineByteOrder; 00190 }; 00191 00192 extern const char *const RECO_BYTE_ORDER; 00193 extern const char *const RECO_FOV; 00194 extern const char *const RECO_SIZE; 00195 extern const char *const RECO_WORDTYPE; 00196 extern const char *const RECO_IMAGE_TYPE; 00197 extern const char *const RECO_TRANSPOSITION; 00198 extern const char *const ACQ_DIM; 00199 extern const char *const NI/*IMND_N_SLICES*/; 00200 extern const char *const NR; 00201 extern const char *const ACQ_SLICE_THICK/*IMND_SLICE_THICK*/; 00202 extern const char *const NECHOES/*IMND_N_ECHO_IMAGES*/; 00203 extern const char *const ACQ_SLICE_SEPN/*IMND_SLICE_SEPN*/; 00204 extern const char *const ACQ_SLICE_SEPN_MODE; 00205 extern const char *const ACQ_ECHO_TIME; 00206 extern const char *const ACQ_REPETITION_TIME; 00207 extern const char *const ACQ_INVERSION_TIME; 00208 } // end namespace itk 00209 00210 #endif // __itkBruker2DSEQImageIO_h 00211