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 Superclass::IndexValueType IndexValueType;
00086 typedef std::vector< IndexValueType > SliceIndexType;
00087 typedef vnl_vector_fixed< double, 3 > ImageTypeRescaleValuesType;
00088
00089 typedef VectorContainer< unsigned int, ImageTypeRescaleValuesType >
00090 ImageTypeRescaleValuesContainerType;
00091 typedef ImageTypeRescaleValuesContainerType::Pointer
00092 ImageTypeRescaleValuesContainerTypePtr;
00093 typedef VectorContainer< unsigned int, ImageTypeRescaleValuesContainerTypePtr >
00094 ScanningSequenceImageTypeRescaleValuesContainerType;
00095 typedef double GradientBvalueType;
00096 typedef VectorContainer< unsigned int, GradientBvalueType >
00097 GradientBvalueContainerType;
00098 typedef vnl_vector_fixed< double, 3 >
00099 GradientDirectionType;
00100 typedef VectorContainer< unsigned int, GradientDirectionType >
00101 GradientDirectionContainerType;
00102 typedef VectorContainer< unsigned int, int >
00103 LabelTypesASLContainerType;
00104
00105
00106
00112 virtual bool CanReadFile(const char* FileNameToRead);
00113
00115 virtual void ReadImageInformation();
00116
00118 virtual void Read(void* buffer);
00119
00120
00121
00128 virtual bool CanWriteFile( const char * itkNotUsed( FileNameToWrite ) )
00129 {
00130 return false;
00131 }
00132
00134 virtual void WriteImageInformation()
00135 {
00136 return;
00137 }
00138
00141 virtual void Write( const void * itkNotUsed(buffer) )
00142 {
00143 return;
00144 }
00145
00146 protected:
00147 PhilipsRECImageIO();
00148 ~PhilipsRECImageIO();
00149 void PrintSelf(std::ostream& os, Indent indent) const;
00150
00151 private:
00152
00153 PhilipsRECImageIO(const Self&);
00154 void operator=(const Self&);
00155 void SwapBytesIfNecessary(void * buffer, unsigned long numberOfPixels);
00156 IndexValueType GetSliceIndex(IndexValueType index) const;
00157
00158 SliceIndexType * m_SliceIndex;
00159 ImageIOBase::ByteOrder m_MachineByteOrder;
00160 };
00161
00162 }
00163
00164 #endif // __itkPhilipsRECImageIO_h
00165