001/* 002 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 003 * 004 * The contents of this file are subject to the Mozilla Public License Version 005 * 1.1 (the "License"); you may not use this file except in compliance with 006 * the License. You may obtain a copy of the License at 007 * http://www.mozilla.org/MPL/ 008 * 009 * Software distributed under the License is distributed on an "AS IS" basis, 010 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 011 * for the specific language governing rights and limitations under the 012 * License. 013 * 014 * The Original Code is part of dcm4che, an implementation of DICOM(TM) in 015 * Java(TM), hosted at https://github.com/gunterze/dcm4che. 016 * 017 * The Initial Developer of the Original Code is 018 * J4Care. 019 * Portions created by the Initial Developer are Copyright (C) 2015-2017 020 * the Initial Developer. All Rights Reserved. 021 * 022 * Contributor(s): 023 * See @authors listed below 024 * 025 * Alternatively, the contents of this file may be used under the terms of 026 * either the GNU General Public License Version 2 or later (the "GPL"), or 027 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 028 * in which case the provisions of the GPL or the LGPL are applicable instead 029 * of those above. If you wish to allow use of your version of this file only 030 * under the terms of either the GPL or the LGPL, and not to allow others to 031 * use your version of this file under the terms of the MPL, indicate your 032 * decision by deleting the provisions above and replace them with the notice 033 * and other provisions required by the GPL or the LGPL. If you do not delete 034 * the provisions above, a recipient may use your version of this file under 035 * the terms of any one of the MPL, the GPL or the LGPL. 036 * 037 */ 038 039package org.dcm4che3.dcmr; 040 041import org.dcm4che3.data.Code; 042 043import java.util.HashMap; 044import java.util.Map; 045 046/** 047 * @author Gunter Zeilinger <gunterze@gmail.com> 048 * @since Mar 2017 049 */ 050public class AcquisitionModality { 051 public static final Code Autorefraction = new Code("AR", "DCM", null, "Autorefraction"); 052 public static final Code BoneMineralDensitometry = new Code("BMD", "DCM", null, "Bone Mineral Densitometry"); 053 public static final Code UltrasoundBoneDensitometry = new Code("BDUS", "DCM", null, "Ultrasound Bone Densitometry"); 054 public static final Code CardiacElectrophysiology = new Code("EPS", "DCM", null, "Cardiac Electrophysiology"); 055 public static final Code ComputedRadiography = new Code("CR", "DCM", null, "Computed Radiography"); 056 public static final Code ComputedTomography = new Code("CT", "DCM", null, "Computed Tomography"); 057 public static final Code DigitalRadiography = new Code("DX", "DCM", null, "Digital Radiography"); 058 public static final Code Electrocardiography = new Code("ECG", "DCM", null, "Electrocardiography"); 059 public static final Code Endoscopy = new Code("ES", "DCM", null, "Endoscopy"); 060 public static final Code ExternalCameraPhotography = new Code("XC", "DCM", null, "External-camera Photography"); 061 public static final Code GeneralMicroscopy = new Code("GM", "DCM", null, "General Microscopy"); 062 public static final Code HemodynamicWaveform = new Code("HD", "DCM", null, "Hemodynamic Waveform"); 063 public static final Code IntraOralRadiography = new Code("IO", "DCM", null, "Intra-oral Radiography"); 064 public static final Code IntravascularOpticalCoherence = new Code("IVOCT", "DCM", null, "Intravascular Optical Coherence Tomography"); 065 public static final Code IntravascularUltrasound = new Code("IVUS", "DCM", null, "Intravascular Ultrasound"); 066 public static final Code Keratometry = new Code("KER", "DCM", null, "Keratometry"); 067 public static final Code Lensometry = new Code("LEN", "DCM", null, "Lensometry"); 068 public static final Code MagneticResonance = new Code("MR", "DCM", null, "Magnetic Resonance"); 069 public static final Code Mammography = new Code("MG", "DCM", null, "Mammography"); 070 public static final Code NuclearMedicine = new Code("NM", "DCM", null, "Nuclear Medicine"); 071 public static final Code OphthalmicAxialMeasurements = new Code("OAM", "DCM", null, "Ophthalmic Axial Measurements"); 072 public static final Code OpticalCoherenceTomography = new Code("OCT", "DCM", null, "Optical Coherence Tomography"); 073 public static final Code OphthalmicMapping = new Code("OPM", "DCM", null, "Ophthalmic Mapping"); 074 public static final Code OphthalmicPhotography = new Code("OP", "DCM", null, "Ophthalmic Photography"); 075 public static final Code OphthalmicRefraction = new Code("OPR", "DCM", null, "Ophthalmic Refraction"); 076 public static final Code OphthalmicTomography = new Code("OPT", "DCM", null, "Ophthalmic Tomography"); 077 public static final Code OphthalmicVisualField = new Code("OPV", "DCM", null, "Ophthalmic Visual Field"); 078 public static final Code OpticalSurfaceScanner = new Code("OSS", "DCM", null, "Optical Surface Scanner"); 079 public static final Code PanoramicXRay = new Code("PX", "DCM", null, "Panoramic X-Ray"); 080 public static final Code PositronEmissionTomography = new Code("PT", "DCM", null, "Positron emission tomography"); 081 public static final Code Radiofluoroscopy = new Code("RF", "DCM", null, "Radiofluoroscopy"); 082 public static final Code RadiographicImaging = new Code("RG", "DCM", null, "Radiographic imaging"); 083 public static final Code SlideMicroscopy = new Code("SM", "DCM", null, "Slide Microscopy"); 084 public static final Code SubjectiveRefraction = new Code("SRF", "DCM", null, "Subjective Refraction"); 085 public static final Code Ultrasound = new Code("US", "DCM", null, "Ultrasound"); 086 public static final Code VisualAcuity = new Code("VA", "DCM", null, "Visual Acuity"); 087 public static final Code XRayAngiography = new Code("XA", "DCM", null, "X-Ray Angiography"); 088 089 private static final Map<String,Code> MODALITIES = new HashMap<String,Code>(50); 090 static { 091 Code[] codes = { 092 Autorefraction, 093 BoneMineralDensitometry, 094 UltrasoundBoneDensitometry, 095 CardiacElectrophysiology, 096 ComputedRadiography, 097 ComputedTomography, 098 DigitalRadiography, 099 Electrocardiography, 100 Endoscopy, 101 ExternalCameraPhotography , 102 GeneralMicroscopy, 103 HemodynamicWaveform, 104 IntraOralRadiography , 105 IntravascularOpticalCoherence , 106 IntravascularUltrasound, 107 Keratometry, 108 Lensometry, 109 MagneticResonance, 110 Mammography, 111 NuclearMedicine, 112 OphthalmicAxialMeasurements, 113 OpticalCoherenceTomography, 114 OphthalmicMapping, 115 OphthalmicPhotography, 116 OphthalmicRefraction, 117 OphthalmicTomography, 118 OphthalmicVisualField, 119 OpticalSurfaceScanner, 120 PanoramicXRay, 121 PositronEmissionTomography, 122 Radiofluoroscopy, 123 RadiographicImaging, 124 SlideMicroscopy, 125 SubjectiveRefraction, 126 Ultrasound, 127 VisualAcuity, 128 XRayAngiography 129 }; 130 for (Code code : codes) { 131 MODALITIES.put(code.getCodeValue(), code); 132 } 133 134 } 135 136 public static Code codeOf(String modality) { 137 return MODALITIES.get(modality); 138 } 139 140 public static Code addCode(Code code) { 141 return MODALITIES.put(code.getCodeValue(), code); 142 } 143 144 public static Code removeCode(String modality) { 145 return MODALITIES.remove(modality); 146 } 147}