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: 2010-01-22 10:03:46 $
00007   Version:   $Revision: 1.8 $
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 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   /*-------- This part of the interfaces deals with reading data. ----- */
00106 
00112   virtual bool CanReadFile(const char* FileNameToRead);
00113 
00115   virtual void ReadImageInformation();
00116 
00118   virtual void Read(void* buffer);
00119 
00120   /*-------- This part of the interfaces deals with writing data. ----- */
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&); //purposely not implemented
00154   void operator=(const Self&); //purposely not implemented
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 } // end namespace itk
00163 
00164 #endif // __itkPhilipsRECImageIO_h
00165 

Generated at Mon Jul 12 2010 19:27:43 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000