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;
023
024/**
025 *
026 * @author Luís A. Bastião Silva <bastiao@ua.pt>
027 */
028public class Serie
029{
030
031    private Study parent;
032    private String SerieInstanceUID ;
033    private String SeriesDescription;
034
035    private int SerieNumber ;
036    private String Modality ;
037    private String SeriesDate = "";
038    private String ProtocolName = "";
039
040    private String BodyPartThickness = "";
041    private String patientOrientation = "";
042    private String compressionForce = "";
043    // Only for MG
044    private String ViewCodeSequence = "";
045    private String ViewCodeSequence_CodeValue = "";
046    private String ViewCodeSequence_CodingSchemeDesignator = "";
047    private String ViewCodeSequence_CodingSchemeVersion = "";
048    private String ViewCodeSequence_CodeMeaning = "";
049
050    private String ViewPosition = "";
051    private String ImageLaterality = "";
052    private String AcquisitionDeviceProcessingDescription = "";
053    
054    
055    private ArrayList<URI> imageList = new ArrayList<>();
056    private ArrayList<String> UIDList = new ArrayList<>();
057
058    public Serie(Study study, String SerieInstanceUID, String modality)
059    {
060        this.parent = study;
061        this.Modality = modality;
062        this.SerieInstanceUID = SerieInstanceUID ; 
063        
064    }
065
066    public Serie(Study study, String SerieInstanceUID, int SerieNumber)
067    {
068        this.parent = study;
069        this.SerieInstanceUID = SerieInstanceUID ;
070        this.SerieNumber = SerieNumber ; 
071        
072    }
073
074
075    public void addImage(URI ImagePath, String sopUid){
076        this.imageList.add(ImagePath);
077        this.UIDList.add(sopUid);
078    }
079
080    public void removeImage(URI imagePath){
081        this.imageList.remove(imagePath);
082    }
083
084
085    /**
086     * @return the SerieInstanceUID
087     */
088    public String getSerieInstanceUID(){
089        return SerieInstanceUID;
090    }
091
092    /**
093     * @param SerieInstanceUID the SerieInstanceUID to set
094     */
095    public void setSerieInstanceUID(String SerieInstanceUID) {
096        this.SerieInstanceUID = SerieInstanceUID;
097    }
098
099    /**
100     * @return the SerieNumber
101     */
102    public int getSerieNumber() {
103        return SerieNumber;
104    }
105
106    /**
107     * @param SerieNumber the SerieNumber to set
108     */
109    public void setSerieNumber(int SerieNumber) {
110        this.SerieNumber = SerieNumber;
111    }
112
113    /**
114     * @return the imageList
115     */
116    public ArrayList<URI> getImageList() {
117        return imageList;
118    }
119
120    public ArrayList<String> getSOPInstanceUIDList(){
121        return UIDList;
122    }
123
124    /**
125     * @param imageList the imageList to set
126     */
127    public void setImageList(ArrayList<URI> imageList, ArrayList<String> sops) {
128        this.imageList = imageList;
129        this.UIDList = sops;
130    }
131
132    /**
133     * @return the Modality
134     */
135    public String getModality() {
136        return Modality;
137    }
138
139    /**
140     * @param Modality the Modality to set
141     */
142    public void setModality(String Modality) {
143        this.Modality = Modality;
144    }
145
146    /**
147     * @return the parent
148     */
149    public Study getParent() {
150        return parent;
151    }
152
153    /**
154     * @param parent the parent to set
155     */
156    public void setParent(Study parent) {
157        this.parent = parent;
158    }
159
160    /**
161     * @return the SeriesDescription
162     */
163    public String getSeriesDescription() {
164        return SeriesDescription;
165    }
166
167    /**
168     * @param SeriesDescription the SeriesDescription to set
169     */
170    public void setSeriesDescription(String SeriesDescription) {
171        this.SeriesDescription = SeriesDescription;
172    }
173
174
175    /**
176     * @return the SeriesDate
177     */
178    public String getSeriesDate() {
179        return SeriesDate;
180    }
181
182    /**
183     * @param SeriesDate the SeriesDate to set
184     */
185    public void setSeriesDate(String SeriesDate) {
186        this.SeriesDate = SeriesDate;
187    }
188
189
190
191    /**
192     * @return the ProtocolName
193     */
194    public String getProtocolName() {
195        return ProtocolName;
196    }
197
198    /**
199     * @param ProtocolName the ProtocolName to set
200     */
201    public void setProtocolName(String ProtocolName) {
202        this.ProtocolName = ProtocolName;
203    }
204
205    /**
206     * @return the BodyPartThickness
207     */
208    public String getBodyPartThickness() {
209        return BodyPartThickness;
210    }
211
212    /**
213     * @param BodyPartThickness the BodyPartThickness to set
214     */
215    public void setBodyPartThickness(String BodyPartThickness) {
216        this.BodyPartThickness = BodyPartThickness;
217    }
218
219
220    /**
221     * @return the patientOrientation
222     */
223    public String getPatientOrientation() {
224        return patientOrientation;
225    }
226
227    /**
228     * @param patientOrientation the patientOrientation to set
229     */
230    public void setPatientOrientation(String patientOrientation) {
231        this.patientOrientation = patientOrientation;
232    }
233
234    /**
235     * @return the compressionForce
236     */
237    public String getCompressionForce() {
238        return compressionForce;
239    }
240
241    /**
242     * @param compressionForce the compressionForce to set
243     */
244    public void setCompressionForce(String compressionForce) {
245        this.compressionForce = compressionForce;
246    }
247
248    /**
249     * @return the ViewCodeSequence
250     */
251    public String getViewCodeSequence() {
252        return ViewCodeSequence;
253    }
254
255    /**
256     * @param ViewCodeSequence the ViewCodeSequence to set
257     */
258    public void setViewCodeSequence(String ViewCodeSequence) {
259        this.ViewCodeSequence = ViewCodeSequence;
260    }
261
262    /**
263     * @return the ViewCodeSequence_CodeValue
264     */
265    public String getViewCodeSequence_CodeValue() {
266        return ViewCodeSequence_CodeValue;
267    }
268
269    /**
270     * @param ViewCodeSequence_CodeValue the ViewCodeSequence_CodeValue to set
271     */
272    public void setViewCodeSequence_CodeValue(String ViewCodeSequence_CodeValue) {
273        this.ViewCodeSequence_CodeValue = ViewCodeSequence_CodeValue;
274    }
275
276    /**
277     * @return the ViewCodeSequence_CodingSchemeDesignator
278     */
279    public String getViewCodeSequence_CodingSchemeDesignator() {
280        return ViewCodeSequence_CodingSchemeDesignator;
281    }
282
283    /**
284     * @param ViewCodeSequence_CodingSchemeDesignator the ViewCodeSequence_CodingSchemeDesignator to set
285     */
286    public void setViewCodeSequence_CodingSchemeDesignator(String ViewCodeSequence_CodingSchemeDesignator) {
287        this.ViewCodeSequence_CodingSchemeDesignator = ViewCodeSequence_CodingSchemeDesignator;
288    }
289
290    /**
291     * @return the ViewCodeSequence_CodingSchemeVersion
292     */
293    public String getViewCodeSequence_CodingSchemeVersion() {
294        return ViewCodeSequence_CodingSchemeVersion;
295    }
296
297    /**
298     * @param ViewCodeSequence_CodingSchemeVersion the ViewCodeSequence_CodingSchemeVersion to set
299     */
300    public void setViewCodeSequence_CodingSchemeVersion(String ViewCodeSequence_CodingSchemeVersion) {
301        this.ViewCodeSequence_CodingSchemeVersion = ViewCodeSequence_CodingSchemeVersion;
302    }
303
304    /**
305     * @return the ViewCodeSequence_CodeMeaning
306     */
307    public String getViewCodeSequence_CodeMeaning() {
308        return ViewCodeSequence_CodeMeaning;
309    }
310
311    /**
312     * @param ViewCodeSequence_CodeMeaning the ViewCodeSequence_CodeMeaning to set
313     */
314    public void setViewCodeSequence_CodeMeaning(String ViewCodeSequence_CodeMeaning) {
315        this.ViewCodeSequence_CodeMeaning = ViewCodeSequence_CodeMeaning;
316    }
317
318    /**
319     * @return the ViewPosition
320     */
321    public String getViewPosition() {
322        return ViewPosition;
323    }
324
325    /**
326     * @param ViewPosition the ViewPosition to set
327     */
328    public void setViewPosition(String ViewPosition) {
329        this.ViewPosition = ViewPosition;
330    }
331
332    /**
333     * @return the ImageLaterality
334     */
335    public String getImageLaterality() {
336        return ImageLaterality;
337    }
338
339    /**
340     * @param ImageLaterality the ImageLaterality to set
341     */
342    public void setImageLaterality(String ImageLaterality) {
343        this.ImageLaterality = ImageLaterality;
344    }
345
346    /**
347     * @return the AcquisitionDeviceProcessingDescription
348     */
349    public String getAcquisitionDeviceProcessingDescription() {
350        return AcquisitionDeviceProcessingDescription;
351    }
352
353    /**
354     * @param AcquisitionDeviceProcessingDescription the AcquisitionDeviceProcessingDescription to set
355     */
356    public void setAcquisitionDeviceProcessingDescription(String AcquisitionDeviceProcessingDescription) {
357        this.AcquisitionDeviceProcessingDescription = AcquisitionDeviceProcessingDescription;
358    }
359    
360    public String toString()
361    {
362    
363        
364        String result = "";
365        result += "SeriesInstanceUID:" + SerieInstanceUID + "\n";
366        result += "SeriesDescription:" + SeriesDescription + "\n";
367        result += "SerieNumber:" + SerieNumber + "\n";
368        result += "Modality:" + Modality + "\n";
369        return result;
370        
371    }
372    
373
374}