itkPhilipsRECImageIO.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00033 #ifndef __itkPhilipsRECImageIO_h
00034 #define __itkPhilipsRECImageIO_h
00035
00036 #ifdef _MSC_VER
00037 #pragma warning ( disable : 4786 )
00038 #endif
00039
00040 #include "itkImageIOBase.h"
00041 #include "itkVectorContainer.h"
00042 #include "vnl/vnl_vector_fixed.h"
00043
00044 namespace itk
00045 {
00053 class ITK_EXPORT PhilipsRECImageIO : public ImageIOBase
00054 {
00055 public:
00057 typedef PhilipsRECImageIO Self;
00058 typedef ImageIOBase Superclass;
00059 typedef SmartPointer<Self> Pointer;
00060
00062 itkNewMacro(Self);
00063
00065 itkTypeMacro(PhilipsRECImageIO, Superclass);
00066
00068 typedef VectorContainer< unsigned int, double > EchoTimesContainerType;
00069 typedef VectorContainer< unsigned int, double > TriggerTimesContainerType;
00070 typedef VectorContainer< unsigned int, double > RepetitionTimesContainerType;
00071 typedef vnl_vector_fixed< int, 2 > ScanResolutionType;
00072 typedef vnl_vector_fixed< float, 3 > FOVType;
00073 typedef vnl_vector_fixed< double, 3 > AngulationMidSliceType;
00074 typedef vnl_vector_fixed< double, 3 > OffCentreMidSliceType;
00075 typedef vnl_vector_fixed< float, 3 > PhaseEncodingVelocityType;
00076
00083 typedef vnl_vector_fixed< int, 8 > ImageTypesType;
00084 typedef vnl_vector_fixed< int, 8 > ScanningSequencesType;
00085 typedef std::vector< int > SliceIndexType;
00086 typedef vnl_vector_fixed< double, 3 > ImageTypeRescaleValuesType;
00087
00088 typedef VectorContainer< unsigned int, ImageTypeRescaleValuesType >
00089 ImageTypeRescaleValuesContainerType;
00090 typedef ImageTypeRescaleValuesContainerType::Pointer
00091 ImageTypeRescaleValuesContainerTypePtr;
00092 typedef VectorContainer< unsigned int, ImageTypeRescaleValuesContainerTypePtr >
00093 ScanningSequenceImageTypeRescaleValuesContainerType;
00094 typedef double GradientBvalueType;
00095 typedef VectorContainer< unsigned int, GradientBvalueType >
00096 GradientBvalueContainerType;
00097 typedef vnl_vector_fixed< double, 3 >
00098 GradientDirectionType;
00099 typedef VectorContainer< unsigned int, GradientDirectionType >
00100 GradientDirectionContainerType;
00101 typedef VectorContainer< unsigned int, int >
00102 LabelTypesASLContainerType;
00103
00104
00105
00111 virtual bool CanReadFile(const char* FileNameToRead);
00112
00114 virtual void ReadImageInformation();
00115
00117 virtual void Read(void* buffer);
00118
00119
00120
00127 virtual bool CanWriteFile( const char * itkNotUsed( FileNameToWrite ) )
00128 {
00129 return false;
00130 }
00131
00133 virtual void WriteImageInformation()
00134 {
00135 return;
00136 }
00137
00140 virtual void Write( const void * itkNotUsed(buffer) )
00141 {
00142 return;
00143 }
00144
00145 protected:
00146 PhilipsRECImageIO();
00147 ~PhilipsRECImageIO();
00148 void PrintSelf(std::ostream& os, Indent indent) const;
00149
00150 private:
00151
00152 PhilipsRECImageIO(const Self&);
00153 void operator=(const Self&);
00154 void SwapBytesIfNecessary(void * buffer, unsigned long numberOfPixels);
00155 int GetSliceIndex(int index);
00156
00157 SliceIndexType * m_SliceIndex;
00158 ImageIOBase::ByteOrder m_MachineByteOrder;
00159 };
00160
00161 }
00162
00163 #endif // __itkPhilipsRECImageIO_h
00164