00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkDICOMImageIO2_h
00018 #define __itkDICOMImageIO2_h
00019
00020 #include <fstream>
00021 #include "itkImageIOBase.h"
00022
00023 #include "DICOMParser.h"
00024 #include "DICOMAppHelper.h"
00025
00026 namespace itk
00027 {
00028
00030 class ITK_EXPORT DICOMImageIO2 : public ImageIOBase
00031 {
00032 public:
00034 typedef DICOMImageIO2 Self;
00035 typedef ImageIOBase Superclass;
00036 typedef SmartPointer<Self> Pointer;
00037
00039 itkNewMacro(Self);
00040
00042 itkTypeMacro(DICOMImageIO2, Superclass);
00043
00044
00045
00048 virtual bool CanReadFile(const char*) ;
00049
00050
00052 virtual void ReadImageInformation();
00053
00055
00056
00058 virtual void Read(void* buffer);
00059
00063
00064
00065
00066
00069 virtual bool CanWriteFile(const char*) {return false;}
00070
00072 virtual void WriteImageInformation() {}
00073
00076 virtual void Write(const void*) {}
00077
00079 void GetPatientName(char* name);
00080 void GetPatientID(char* id);
00081 void GetPatientSex(char* sex);
00082 void GetPatientAge(char* age);
00083 void GetStudyID(char* id);
00084 void GetPatientDOB(char* dob);
00085 void GetStudyDescription(char* desc);
00086 void GetBodyPart(char* part);
00087 void GetNumberOfSeriesInStudy(char* series);
00088 void GetNumberOfStudyRelatedSeries(char* series);
00089 void GetStudyDate(char* date);
00090 void GetModality(char* modality);
00091 void GetManufacturer(char* manu);
00092 void GetInstitution(char* ins);
00093 void GetModel(char* model);
00094
00095
00096 protected:
00097 DICOMImageIO2();
00098 virtual ~DICOMImageIO2();
00099 void PrintSelf(std::ostream& os, Indent indent) const;
00100
00101 itkdicomparser::DICOMParser * m_Parser;
00102 itkdicomparser::DICOMAppHelper * m_AppHelper;
00103
00104 void ReadDataCallback(doublebyte group,
00105 doublebyte element,
00106 itkdicomparser::DICOMParser::VRTypes type,
00107 unsigned char* val,
00108 quadbyte len);
00109
00110 unsigned char* m_ImageDataBuffer;
00111
00112 private:
00113 DICOMImageIO2(const Self&);
00114 void operator=(const Self&);
00115
00116 };
00117
00118 }
00119
00120 #endif // __itkDICOMImageIO2_h