From 643fc6fe50df610993fc6fdf9a7cab65fd397c3f Mon Sep 17 00:00:00 2001 From: frog Date: Thu, 7 Nov 2002 15:11:35 +0000 Subject: [PATCH] * python/gdcm.i: added a typemap that converts a C++ hashing table to native Python dictionary. * python/demo/test.py: - now uses the native dictionary for exploration of gdcmHeader. - takes an optional filename argument (the file to parse). * src/gdcm.h and gdcmHeader.cxx: gdcmHeader now has an accessor on PubElVals hashing table. * Dicts/dicomV3.dic removed error prone trailing spaces. --- Frog --- ChangeLog | 10 ++++++++++ Dicts/dicomV3.dic | 10 +++++----- src/gdcm.h | 3 ++- src/gdcmHeader.cxx | 2 +- 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index a2c75eb6..4b64964d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2002-11-7 Eric Boix + * python/gdcm.i: added a typemap that converts a C++ hashing table + to native Python dictionary. + * python/demo/test.py: + - now uses the native dictionary for exploration of gdcmHeader. + - takes an optional filename argument (the file to parse). + * src/gdcm.h and gdcmHeader.cxx: gdcmHeader now has an accessor on + PubElVals hashing table. + * Dicts/dicomV3.dic removed error prone trailing spaces. + 2002-11-6 Eric Boix * Python wrapping process moved away from src/Makefile to newly created python/Makefile (as well as gdcm.i) diff --git a/Dicts/dicomV3.dic b/Dicts/dicomV3.dic index a83f4ab5..bc2e1342 100644 --- a/Dicts/dicomV3.dic +++ b/Dicts/dicomV3.dic @@ -168,7 +168,7 @@ 0010 0050 SQ PAT Patient's Insurance Plan Code Sequence 0010 1000 LO PAT Other Patient IDs 0010 1001 PN PAT Other Patient Names -0010 1005 PN PAT Patient's Birth Name +0010 1005 PN PAT Patient's Birth Name 0010 1010 AS PAT Patient Age 0010 1020 DS PAT Patient Size 0010 1030 DS PAT Patient Weight @@ -199,7 +199,7 @@ 0018 0020 CS ACQ Scanning Sequence 0018 0021 CS ACQ Sequence Variant 0018 0022 CS ACQ Scan Options -0018 0023 CS ACQ MR Acquisition Type +0018 0023 CS ACQ MR Acquisition Type 0018 0024 SH ACQ Sequence Name 0018 0025 CS ACQ Angio Flag 0018 0026 SQ ACQ Intervention Drug Information Sequence @@ -598,7 +598,7 @@ 0032 1020 LO SDY Scheduled Study Location 0032 1021 AE SDY Scheduled Study Location AE Title(s) 0032 1030 LO SDY Study Reason -0032 1032 PN SDY Requesting Physician +0032 1032 PN SDY Requesting Physician 0032 1033 LO SDY Requesting Service 0032 1040 DA SDY Study Arrival Date 0032 1041 TM SDY Study Arrival Time @@ -696,7 +696,7 @@ 0040 0294 DS PRC Quantity 0040 0295 SQ PRC Measuring Units Sequence 0040 0296 SQ PRC Billing Item Sequence -0040 0300 US PRC Total Time of Fluoroscopy} +0040 0300 US PRC Total Time of Fluoroscopy 0040 0301 US PRC Total Number of Exposures 0040 0302 US PRC Entrance Dose 0040 0303 US PRC Exposed Area @@ -894,7 +894,7 @@ 0054 1330 US NMI Image Index 0054 1400 CS NMI Counts Included 0054 1401 CS NMI Dead Time Correction Flag -0088 0000 UL MED Media Group Length +0088 0000 UL MED Media Group Length 0088 0130 SH MED Storage Media File-set ID 0088 0140 UI MED Storage Media File-setUID 0088 0200 SQ MED Icon Image Sequence diff --git a/src/gdcm.h b/src/gdcm.h index 421ca6c6..549dca95 100644 --- a/src/gdcm.h +++ b/src/gdcm.h @@ -191,7 +191,7 @@ class gdcmHeader { //BigEndian, //BadBigEndian}; private: - // All instances share the same valur representation dictionary + // All instances share the same value representation dictionary static VRHT *dicom_vr; static gdcmDictSet* Dicts; // Global dictionary container gdcmDict* RefPubDict; // Public Dictionary @@ -262,6 +262,7 @@ public: // of C/C++ vs Python). // TODO Swig string GetPubElValRepByName(string TagName); // TODO Swig string GetPubElValRepByNumber(guint16 group, guint16 element); + TagElValueHT & GetPubElVal(void) { return PubElVals.GetTagHt(); }; void PrintPubElVal(ostream & os = std::cout); void PrintPubDict(ostream &); diff --git a/src/gdcmHeader.cxx b/src/gdcmHeader.cxx index 6eb47c6f..4cdeeebd 100644 --- a/src/gdcmHeader.cxx +++ b/src/gdcmHeader.cxx @@ -487,7 +487,7 @@ ElValue * gdcmHeader::ReadNextElement(void) { // Find out if the tag we encountered is in the dictionaries: gdcmDictEntry * NewTag = IsInDicts(g, n); if (!NewTag) - NewTag = new gdcmDictEntry(g, n, "Unknown", "Unknown", "Unkown"); + NewTag = new gdcmDictEntry(g, n, "Unknown", "Unknown", "Unknown"); NewElVal = new ElValue(NewTag); if (!NewElVal) { -- 2.48.1