001/** 002 * Copyright (C) 2014 Universidade de Aveiro, DETI/IEETA, Bioinformatics Group - http://bioinformatics.ua.pt/ 003 * 004 * This file is part of Dicoogle/dicoogle. 005 * 006 * Dicoogle/dicoogle is free software: you can redistribute it and/or modify 007 * it under the terms of the GNU General Public License as published by 008 * the Free Software Foundation, either version 3 of the License, or 009 * (at your option) any later version. 010 * 011 * Dicoogle/dicoogle is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 014 * GNU General Public License for more details. 015 * 016 * You should have received a copy of the GNU General Public License 017 * along with Dicoogle. If not, see <http://www.gnu.org/licenses/>. 018 */ 019package pt.ua.dicoogle.core.dim; 020 021import java.net.URI; 022import java.util.ArrayList; 023import java.util.Hashtable; 024 025/** 026 * 027 * @author Luís A. Bastião Silva <bastiao@ua.pt> 028 */ 029public class Study { 030 031 private Patient parent; 032 private String StudyInstanceUID ; 033 private String StudyID; 034 private String StudyData ; 035 private String StudyTime ; 036 private String AccessionNumber; 037 private String StudyDescription; 038 private String InstitutuionName; 039 040 private String operatorsName; 041 private String RequestingPhysician; 042 043 // Look in the cases where there same patient identifier with different 044 // patient names 045 private String patientName; 046 047 048 private ArrayList<Serie> series = new ArrayList<Serie>() ; 049 private Hashtable<String, Serie> seriesHash = new Hashtable<String, Serie>(); 050 051 public Study(Patient patient, String StudyInstanceUID, String StudyDate) 052 { 053 this.parent = patient; 054 this.StudyInstanceUID = StudyInstanceUID ; 055 this.StudyData = StudyDate ; 056 057 } 058 059 060 public String getPatientName() { 061 return patientName; 062 } 063 064 public void setPatientName(String patientName) { 065 this.patientName = patientName; 066 } 067 068 069 /** 070 * @return the StudyInstanceUID 071 */ 072 public String getStudyInstanceUID() { 073 return StudyInstanceUID; 074 } 075 076 /** 077 * @param StudyInstanceUID the StudyInstanceUID to set 078 */ 079 public void setStudyInstanceUID(String StudyInstanceUID) { 080 this.StudyInstanceUID = StudyInstanceUID; 081 } 082 083 /** 084 * @return the StudyData 085 */ 086 public String getStudyData() { 087 return StudyData; 088 } 089 090 /** 091 * @param StudyData the StudyData to set 092 */ 093 public void setStudyData(String StudyData) { 094 this.StudyData = StudyData; 095 } 096 097 098 099 public void addSerie(Serie s){ 100 if (this.seriesHash.containsKey(s.getSerieInstanceUID())){ 101 102 Serie existSerie = this.seriesHash.get(s.getSerieInstanceUID()); 103 ArrayList<URI> img = s.getImageList(); 104 ArrayList<String> uid = s.getSOPInstanceUIDList(); 105 106 int size = img.size(); 107 for (int i=0;i<size;i++){ 108 existSerie.addImage(img.get(i),uid.get(i)); 109 } 110 } 111 else 112 { 113 this.series.add(s); 114 this.seriesHash.put(s.getSerieInstanceUID(), s) ; 115 } 116 117 } 118 119 /** 120 * @return the series 121 */ 122 public ArrayList<Serie> getSeries() { 123 return series; 124 } 125 126 public Serie getSeries(String seriesInstanceUID) { 127 return this.seriesHash.get(seriesInstanceUID); 128 } 129 130 /** 131 * @param series the series to set 132 */ 133 public void setSeries(ArrayList<Serie> series) { 134 this.series = series; 135 } 136 137 /** 138 * @return the parent 139 */ 140 public Patient getParent() { 141 return parent; 142 } 143 144 /** 145 * @return the StudyTime 146 */ 147 public String getStudyTime() { 148 return StudyTime; 149 } 150 151 /** 152 * @param StudyTime the StudyTime to set 153 */ 154 public void setStudyTime(String StudyTime) { 155 this.StudyTime = StudyTime; 156 } 157 158 /** 159 * @return the AccessionNumber 160 */ 161 public String getAccessionNumber() { 162 return AccessionNumber; 163 } 164 165 /** 166 * @param AccessionNumber the AccessionNumber to set 167 */ 168 public void setAccessionNumber(String AccessionNumber) { 169 this.AccessionNumber = AccessionNumber; 170 } 171 172 /** 173 * @return the StudyDescription 174 */ 175 public String getStudyDescription() { 176 return StudyDescription; 177 } 178 179 /** 180 * @param StudyDescription the StudyDescription to set 181 */ 182 public void setStudyDescription(String StudyDescription) { 183 this.StudyDescription = StudyDescription; 184 } 185 186 /** 187 * @return the StudyID 188 */ 189 public String getStudyID() { 190 return StudyID; 191 } 192 193 /** 194 * @param StudyID the StudyID to set 195 */ 196 public void setStudyID(String StudyID) { 197 this.StudyID = StudyID; 198 } 199 200 /** 201 * @return the InstitutuionName 202 */ 203 public String getInstitutuionName() { 204 return InstitutuionName; 205 } 206 207 /** 208 * @param InstitutuionName the InstitutuionName to set 209 */ 210 public void setInstitutuionName(String InstitutuionName) { 211 this.InstitutuionName = InstitutuionName; 212 } 213 214 215 /** 216 * @return the operatorsName 217 */ 218 public String getOperatorsName() { 219 return operatorsName; 220 } 221 222 /** 223 * @param operatorsName the operatorsName to set 224 */ 225 public void setOperatorsName(String operatorsName) { 226 this.operatorsName = operatorsName; 227 } 228 229 /** 230 * @return the RequestingPhysician 231 */ 232 public String getRequestingPhysician() { 233 return RequestingPhysician; 234 } 235 236 /** 237 * @param RequestingPhysician the RequestingPhysician to set 238 */ 239 public void setRequestingPhysician(String RequestingPhysician) { 240 this.RequestingPhysician = RequestingPhysician; 241 } 242 243 244}