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: 2008-06-23 22:04:35 $
00007   Version:   $Revision: 1.4 $
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 
00102   /*-------- This part of the interfaces deals with reading data. ----- */
00103 
00109   virtual bool CanReadFile(const char* FileNameToRead);
00110 
00112   virtual void ReadImageInformation();
00113 
00115   virtual void Read(void* buffer);
00116 
00117   /*-------- This part of the interfaces deals with writing data. ----- */
00118 
00125   virtual bool CanWriteFile( const char * itkNotUsed( FileNameToWrite ) )
00126     {
00127     return false;
00128     }
00129 
00131   virtual void WriteImageInformation()
00132     { 
00133     return;
00134     }
00135 
00138   virtual void Write( const void * itkNotUsed(buffer) )
00139     {
00140     return;
00141     }
00142 
00143 protected:
00144   PhilipsRECImageIO();
00145   ~PhilipsRECImageIO();
00146   void PrintSelf(std::ostream& os, Indent indent) const;
00147 
00148 private:
00149 
00150   PhilipsRECImageIO(const Self&); //purposely not implemented
00151   void operator=(const Self&); //purposely not implemented
00152   void SwapBytesIfNecessary(void * buffer, unsigned long numberOfPixels);
00153   int GetSliceIndex(int index);
00154 
00155   SliceIndexType *          m_SliceIndex;
00156   ImageIOBase::ByteOrder    m_MachineByteOrder;
00157 };
00158 
00159 extern const char *const PAR_Version;
00160 extern const char *const PAR_SliceOrientation;
00161 extern const char *const PAR_ExaminationName;
00162 extern const char *const PAR_ProtocolName;
00163 extern const char *const PAR_SeriesType;
00164 extern const char *const PAR_AcquisitionNr;
00165 extern const char *const PAR_ReconstructionNr;
00166 extern const char *const PAR_ScanDuration;
00167 extern const char *const PAR_MaxNumberOfCardiacPhases;
00168 extern const char *const PAR_TriggerTimes;
00169 extern const char *const PAR_MaxNumberOfEchoes;
00170 extern const char *const PAR_EchoTimes;
00171 extern const char *const PAR_MaxNumberOfDynamics;
00172 extern const char *const PAR_MaxNumberOfMixes;
00173 extern const char *const PAR_PatientPosition;
00174 extern const char *const PAR_PreparationDirection;
00175 extern const char *const PAR_Technique;
00176 extern const char *const PAR_ScanMode;
00177 extern const char *const PAR_NumberOfAverages;
00178 extern const char *const PAR_ScanResolution;
00179 extern const char *const PAR_RepetitionTimes;
00180 extern const char *const PAR_ScanPercentage;
00181 extern const char *const PAR_FOV;
00182 extern const char *const PAR_WaterFatShiftPixels;
00183 extern const char *const PAR_AngulationMidSlice;
00184 extern const char *const PAR_OffCentreMidSlice;
00185 extern const char *const PAR_FlowCompensation;
00186 extern const char *const PAR_Presaturation;
00187 extern const char *const PAR_CardiacFrequency;
00188 extern const char *const PAR_MinRRInterval;
00189 extern const char *const PAR_MaxRRInterval;
00190 extern const char *const PAR_PhaseEncodingVelocity;
00191 extern const char *const PAR_MTC;
00192 extern const char *const PAR_SPIR;
00193 extern const char *const PAR_EPIFactor;
00194 extern const char *const PAR_TurboFactor;
00195 extern const char *const PAR_DynamicScan;
00196 extern const char *const PAR_Diffusion;
00197 extern const char *const PAR_DiffusionEchoTime;
00198 extern const char *const PAR_MaxNumberOfDiffusionValues;
00199 extern const char *const PAR_GradientBValues;
00200 extern const char *const PAR_MaxNumberOfGradientOrients;
00201 extern const char *const PAR_GradientDirectionValues;
00202 extern const char *const PAR_InversionDelay;
00203 extern const char *const PAR_NumberOfImageTypes;
00204 extern const char *const PAR_ImageTypes;
00205 extern const char *const PAR_NumberOfScanningSequences;
00206 extern const char *const PAR_ScanningSequences;
00207 extern const char *const PAR_ScanningSequenceImageTypeRescaleValues;
00208 
00209 } // end namespace itk
00210 
00211 #endif // __itkPhilipsRECImageIO_h
00212 

Generated at Wed Nov 5 23:30:08 2008 for ITK by doxygen 1.5.1 written by Dimitri van Heesch, © 1997-2000