ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkBruker2DSEQImageIO.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00036 #ifndef __itkBruker2DSEQImageIO_h
00037 #define __itkBruker2DSEQImageIO_h
00038 
00039 
00040 #include "itkImageIOBase.h"
00041 #include "itkVectorContainer.h"
00042 
00043 namespace itk
00044 {
00113 class ITK_EXPORT Bruker2DSEQImageIO:public ImageIOBase
00114 {
00115 public:
00116   typedef ImageIOBase SuperClass;
00117 
00119   typedef Bruker2DSEQImageIO   Self;
00120   typedef ImageIOBase          Superclass;
00121   typedef SmartPointer< Self > Pointer;
00122 
00124   itkNewMacro(Self);
00125 
00127   itkTypeMacro(Bruker2DSEQImageIO, Superclass);
00128 
00130   typedef VectorContainer< unsigned int, double > RECOFOVContainerType;
00131   typedef VectorContainer< unsigned int, int >    RECOTranspositionContainerType;
00132   typedef VectorContainer< unsigned int, double > ACQEchoTimeContainerType;
00133   typedef VectorContainer< unsigned int, double > ACQRepetitionTimeContainerType;
00134   typedef VectorContainer< unsigned int, double > ACQInversionTimeContainerType;
00135   typedef VectorContainer< unsigned int, double > ACQSliceSepnContainerType;
00136 
00137   /*-------- This part of the interfaces deals with reading data. ----- */
00138 
00144   virtual bool CanReadFile(const char *FileNameToRead);
00145 
00147   virtual void ReadImageInformation();
00148 
00150   virtual void Read(void *buffer);
00151 
00152   /*-------- This part of the interfaces deals with writing data. ----- */
00153 
00160   virtual bool CanWriteFile( const char *itkNotUsed(FileNameToWrite) )
00161   {
00162     return false;
00163   }
00164 
00166   virtual void WriteImageInformation()
00167   {
00168     return;
00169   }
00170 
00173   virtual void Write( const void *itkNotUsed(buffer) )
00174   {
00175     return;
00176   }
00177 
00178 
00179 protected:
00180   Bruker2DSEQImageIO();
00181   ~Bruker2DSEQImageIO();
00182   void PrintSelf(std::ostream & os, Indent indent) const;
00183 
00184 private:
00185 
00186   Bruker2DSEQImageIO(const Self &); //purposely not implemented
00187   void operator=(const Self &);     //purposely not implemented
00188 
00189   void SwapBytesIfNecessary(void *buffer, SizeValueType numberOfPixels);
00190 
00191   ImageIOBase::ByteOrder m_MachineByteOrder;
00192 };
00193 
00194 extern const char *const RECO_BYTE_ORDER;
00195 extern const char *const RECO_FOV;
00196 extern const char *const RECO_SIZE;
00197 extern const char *const RECO_WORDTYPE;
00198 extern const char *const RECO_IMAGE_TYPE;
00199 extern const char *const RECO_TRANSPOSITION;
00200 extern const char *const ACQ_DIM;
00201 extern const char *const NI; /*IMND_N_SLICES*/
00202 extern const char *const NR;
00203 extern const char *const ACQ_SLICE_THICK; /*IMND_SLICE_THICK*/
00204 extern const char *const NECHOES;         /*IMND_N_ECHO_IMAGES*/
00205 extern const char *const ACQ_SLICE_SEPN;  /*IMND_SLICE_SEPN*/
00206 extern const char *const ACQ_SLICE_SEPN_MODE;
00207 extern const char *const ACQ_ECHO_TIME;
00208 extern const char *const ACQ_REPETITION_TIME;
00209 extern const char *const ACQ_INVERSION_TIME;
00210 } // end namespace itk
00211 
00212 #endif // __itkBruker2DSEQImageIO_h
00213