From 6d5e4fc9ac1db83954aa134a76fdc7a22e7a1610 Mon Sep 17 00:00:00 2001 From: jpr Date: Thu, 11 Sep 2003 13:44:17 +0000 Subject: [PATCH] Missing modalities added, to be compliant with DICOM Part 3.3 '2003 --- src/gdcmHeaderHelper.cxx | 71 ++++++++++++++++++++++++---------------- src/gdcmHeaderHelper.h | 52 ++++++++++++++++++++++++----- 2 files changed, 86 insertions(+), 37 deletions(-) diff --git a/src/gdcmHeaderHelper.cxx b/src/gdcmHeaderHelper.cxx index cb32855d..32ada9e5 100644 --- a/src/gdcmHeaderHelper.cxx +++ b/src/gdcmHeaderHelper.cxx @@ -1,4 +1,4 @@ -// $Header: /cvs/public/gdcm/src/Attic/gdcmHeaderHelper.cxx,v 1.2 2003/09/09 08:46:32 malaterre Exp $ +// $Header: /cvs/public/gdcm/src/Attic/gdcmHeaderHelper.cxx,v 1.3 2003/09/11 13:44:17 jpr Exp $ //This is needed when compiling in debug mode #ifdef _MSC_VER @@ -358,34 +358,47 @@ int gdcmHeaderHelper::GetImageNumber() { ModalityType gdcmHeaderHelper::GetModality(void) { string StrModality = GetPubElValByNumber(0x0008,0x0060); //0008 0060 CS ID Modality if (StrModality != "gdcm::Unfound") { - if ( StrModality.find("CR") < StrModality.length()) - { - return CR; - } - else if ( StrModality.find("CT") < StrModality.length() ) - { - return CT; - } - else if ( StrModality.find("MR") < StrModality.length()) - { - return MR; - } - else if ( StrModality.find("NM") < StrModality.length()) - { - return NM; - } - else if ( StrModality.find("OT") < StrModality.length()) - { - return OT; - } - else if ( StrModality.find("US") < StrModality.length()) - { - return US; - } - else if ( StrModality.find("XA") < StrModality.length()) - { - return XA; - } + if ( StrModality.find("AU") < StrModality.length()) return AU; + else if ( StrModality.find("AS") < StrModality.length()) return AS; + else if ( StrModality.find("BI") < StrModality.length()) return BI; + else if ( StrModality.find("CF") < StrModality.length()) return CF; + else if ( StrModality.find("CP") < StrModality.length()) return CP; + else if ( StrModality.find("CR") < StrModality.length()) return CR; + else if ( StrModality.find("CT") < StrModality.length()) return CT; + else if ( StrModality.find("CS") < StrModality.length()) return CS; + else if ( StrModality.find("DD") < StrModality.length()) return DD; + else if ( StrModality.find("DF") < StrModality.length()) return DF; + else if ( StrModality.find("DG") < StrModality.length()) return DG; + else if ( StrModality.find("DM") < StrModality.length()) return DM; + else if ( StrModality.find("DS") < StrModality.length()) return DS; + else if ( StrModality.find("DX") < StrModality.length()) return DX; + else if ( StrModality.find("ECG") < StrModality.length()) return ECG; + else if ( StrModality.find("EPS") < StrModality.length()) return EPS; + else if ( StrModality.find("FA") < StrModality.length()) return FA; + else if ( StrModality.find("FS") < StrModality.length()) return FS; + else if ( StrModality.find("HC") < StrModality.length()) return HC; + else if ( StrModality.find("HD") < StrModality.length()) return HD; + else if ( StrModality.find("LP") < StrModality.length()) return LP; + else if ( StrModality.find("LS") < StrModality.length()) return LS; + else if ( StrModality.find("MA") < StrModality.length()) return MA; + else if ( StrModality.find("MR") < StrModality.length()) return MR; + else if ( StrModality.find("NM") < StrModality.length()) return NM; + else if ( StrModality.find("OT") < StrModality.length()) return OT; + else if ( StrModality.find("PT") < StrModality.length()) return PT; + else if ( StrModality.find("RF") < StrModality.length()) return RF; + else if ( StrModality.find("RG") < StrModality.length()) return RG; + else if ( StrModality.find("RTDOSE") < StrModality.length()) return RTDOSE; + else if ( StrModality.find("RTIMAGE") < StrModality.length()) return RTIMAGE; + else if ( StrModality.find("RTPLAN") < StrModality.length()) return RTPLAN; + else if ( StrModality.find("RTSTRUCT") < StrModality.length()) return RTSTRUCT; + else if ( StrModality.find("SM") < StrModality.length()) return SM; + else if ( StrModality.find("ST") < StrModality.length()) return ST; + else if ( StrModality.find("TG") < StrModality.length()) return TG; + else if ( StrModality.find("US") < StrModality.length()) return US; + else if ( StrModality.find("VF") < StrModality.length()) return VF; + else if ( StrModality.find("XA") < StrModality.length()) return XA; + else if ( StrModality.find("XC") < StrModality.length()) return XC; + else { //throw error return value ??? diff --git a/src/gdcmHeaderHelper.h b/src/gdcmHeaderHelper.h index a0fc9494..ab5807c6 100644 --- a/src/gdcmHeaderHelper.h +++ b/src/gdcmHeaderHelper.h @@ -1,4 +1,4 @@ -// $Header: /cvs/public/gdcm/src/Attic/gdcmHeaderHelper.h,v 1.2 2003/09/09 08:46:32 malaterre Exp $ +// $Header: /cvs/public/gdcm/src/Attic/gdcmHeaderHelper.h,v 1.3 2003/09/11 13:44:17 jpr Exp $ #ifndef GDCMHEADERHELPER_H #define GDCMHEADERHELPER_H @@ -8,15 +8,51 @@ #include #include + // Dicom Part 3.3 Compliant enum ModalityType { Unknow, - CR, - CT, - MR, - NM, - OT, - US, - XA }; + AU, // Voice Audio + AS, // Angioscopy + BI, // Biomagnetic Imaging + CF, // Cinefluorography + CP, // Culposcopy + CR, // Computed Radiography + CS, // Cystoscopy + CT, // Computed Tomography + DD, // Duplex Dopler + DF, // Digital Fluoroscopy + DG, // Diaphanography + DM, // Digital Microscopy + DS, // Digital Substraction Angiography + DX, // Digital Radiography + ECG, // Echocardiography + EPS, // Basic Cardiac EP + ES, // Endoscopy + FA, // Fluorescein Angiography + FS, // Fundoscopy + HC, // Hard Copy + HD, // Hemodynamic + LP, // Laparoscopy + LS, // Laser Surface Scan + MA, // Magnetic Resonance Angiography + MR, // Magnetic Resonance + NM, // Nuclear Medicine + OT, // Other + PT, // Positron Emission Tomography + RF, // Radio Fluoroscopy + RG, // Radiographic Imaging + RTDOSE, // Radiotherapy Dose + RTIMAGE, // Radiotherapy Image + RTPLAN, // Radiotherapy Plan + RTSTRUCT, // Radiotherapy Structure Set + SM, // Microscopic Imaging + ST, // Single-photon Emission Computed Tomography + TG, // Thermography + US, // Ultrasound + VF, // Videofluorography + XA, // X-Ray Angiography + XC // Photographic Imaging + }; /** This class is meant to *interpret* data given from gdcmHeader -- 2.45.1