Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkPhilipsRECImageIO.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkPhilipsRECImageIO.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-03-19 14:20:58 $
00007   Version:   $Revision: 1.6 $
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 
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   /*-------- This part of the interfaces deals with reading data. ----- */
00105 
00111   virtual bool CanReadFile(const char* FileNameToRead);
00112 
00114   virtual void ReadImageInformation();
00115 
00117   virtual void Read(void* buffer);
00118 
00119   /*-------- This part of the interfaces deals with writing data. ----- */
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&); //purposely not implemented
00153   void operator=(const Self&); //purposely not implemented
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 } // end namespace itk
00162 
00163 #endif // __itkPhilipsRECImageIO_h
00164 

Generated at Tue Sep 15 04:22:01 2009 for ITK by doxygen 1.5.8 written by Dimitri van Heesch, © 1997-2000