00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkDICOMImageIO2_h
00019 #define __itkDICOMImageIO2_h
00020
00021 #include <fstream>
00022 #include "itkImageIOBase.h"
00023
00024 #include "DICOMParser.h"
00025 #include "DICOMAppHelper.h"
00026
00027 namespace itk
00028 {
00029
00031 class ITK_EXPORT DICOMImageIO2 : public ImageIOBase
00032 {
00033 public:
00035 typedef DICOMImageIO2 Self;
00036 typedef ImageIOBase Superclass;
00037 typedef SmartPointer<Self> Pointer;
00038
00040 itkNewMacro(Self);
00041
00043 itkTypeMacro(DICOMImageIO2, Superclass);
00044
00045
00046
00049 virtual bool CanReadFile(const char*) ;
00050
00051
00053 virtual void ReadImageInformation();
00054
00056
00057
00059 virtual void Read(void* buffer);
00060
00064
00065
00066
00067
00070 virtual bool CanWriteFile(const char*) {return false;}
00071
00073 virtual void WriteImageInformation() {}
00074
00077 virtual void Write(const void*) {}
00078
00079
00080 protected:
00081 DICOMImageIO2();
00082 virtual ~DICOMImageIO2();
00083 void PrintSelf(std::ostream& os, Indent indent) const;
00084
00085 DICOMParser * m_Parser;
00086 DICOMAppHelper * m_AppHelper;
00087
00088 void ReadDataCallback(doublebyte group,
00089 doublebyte element,
00090 DICOMParser::VRTypes type,
00091 unsigned char* val,
00092 quadbyte len);
00093
00094 unsigned char* m_ImageDataBuffer;
00095
00096 private:
00097 DICOMImageIO2(const Self&);
00098 void operator=(const Self&);
00099
00100 };
00101
00102 }
00103
00104 #endif // __itkDICOMImageIO2_h