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

itkGDCMImageIO.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkGDCMImageIO.h,v $
00005   Language:  C++
00006   Date:      $Date: 2005/01/23 13:34:23 $
00007   Version:   $Revision: 1.13 $
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   Portions of this code are covered under the VTK copyright.
00013   See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm for details.
00014 
00015      This software is distributed WITHOUT ANY WARRANTY; without even 
00016      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00017      PURPOSE.  See the above copyright notices for more information.
00018 
00019 =========================================================================*/
00020 #ifndef __itkGDCMImageIO_h
00021 #define __itkGDCMImageIO_h
00022 
00023 #include "itkImageIOBase.h"
00024 #include <fstream>
00025 
00026 namespace itk
00027 {
00028 
00050 class ITK_EXPORT GDCMImageIO : public ImageIOBase
00051 {
00052 public:
00054   typedef GDCMImageIO Self;
00055   typedef ImageIOBase Superclass;
00056   typedef SmartPointer<Self>  Pointer;
00057   
00059   itkNewMacro(Self);
00060 
00062   itkTypeMacro(GDCMImageIO, Superclass);
00063 
00064   /*-------- This part of the interface deals with reading data. ------ */
00065 
00068   virtual bool CanReadFile(const char*);
00069   
00071   virtual void ReadImageInformation();
00072   
00074   virtual void Read(void* buffer);
00075 
00076   /*-------- This part of the interfaces deals with writing data. ----- */
00077 
00080   virtual bool CanWriteFile(const char*);
00081 
00084   virtual void WriteImageInformation();
00085   
00088   virtual void Write(const void* buffer);
00089   
00093   itkGetMacro(RescaleSlope, double);
00094   itkGetMacro(RescaleIntercept, double);
00095 
00100   itkGetStringMacro(UIDPrefix);
00101   itkSetStringMacro(UIDPrefix);
00102 
00105   itkSetMacro(KeepOriginalUID,bool);
00106   itkGetMacro(KeepOriginalUID,bool);
00107   itkBooleanMacro(KeepOriginalUID);
00108 
00109 protected:
00110   GDCMImageIO();
00111   ~GDCMImageIO();
00112   void PrintSelf(std::ostream& os, Indent indent) const;
00113 
00114   bool OpenGDCMFileForReading(std::ifstream& os, const char* filename);
00115   bool OpenGDCMFileForWriting(std::ofstream& os, const char* filename);
00116   void InternalReadImageInformation(std::ifstream& file);
00117 
00118   double m_RescaleSlope;
00119   double m_RescaleIntercept;
00120 
00121   std::string m_UIDPrefix;
00122   std::string m_StudyInstanceUID;
00123   std::string m_SeriesInstanceUID;
00124   std::string m_FrameOfReferenceInstanceUID;
00125   bool m_KeepOriginalUID;
00126 
00127 private:
00128   GDCMImageIO(const Self&); //purposely not implemented
00129   void operator=(const Self&); //purposely not implemented
00130 };
00131 
00132 } // end namespace itk
00133 
00134 #endif // __itkGDCMImageIO_h

Generated at Tue Mar 29 23:52:21 2005 for ITK by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2000