QtDcmPatient.cpp
Go to the documentation of this file.
1 /*
2  QtDcm is a C++ Qt based library for communication and conversion of Dicom images.
3  Copyright (C) 2011 Alexandre Abadie <Alexandre.Abadie@univ-rennes1.fr>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License as published by the Free Software Foundation; either
8  version 2.1 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19 
20 
21 #include <QtDcmImage.h>
22 #include <QtDcmSerie.h>
23 #include <QtDcmStudy.h>
24 #include <QtDcmPatient.h>
25 
27 {
28  public:
29  QString id;
30  QString name;
31  QString birthdate;
32  QString sex;
34  QList<QtDcmStudy> studies;
35 };
36 
38 {}
39 
41 {
42  delete d;
43 }
44 
45 QString QtDcmPatient::id() const
46 {
47  return d->id;
48 }
49 
50 void QtDcmPatient::setId(const QString &id)
51 {
52  d->id = id;
53 }
54 
55 QString QtDcmPatient::name() const
56 {
57  return d->name;
58 }
59 
60 void QtDcmPatient::setName(const QString &name)
61 {
62  d->name = name;
63 }
64 
65 QString QtDcmPatient::birthdate() const
66 {
67  return d->birthdate;
68 }
69 
71 {
72  d->birthdate = birthdate;
73 }
74 
75 QString QtDcmPatient::gender() const
76 {
77  return d->sex;
78 }
79 
80 void QtDcmPatient::setGender(const QString &sex)
81 {
82  d->sex = sex;
83 }
84 
85 QList<QtDcmStudy> QtDcmPatient::studies() const
86 {
87  return d->studies;
88 }
89 
90 void QtDcmPatient::setStudies(const QList<QtDcmStudy> &studies)
91 {
92  d->studies = studies;
93 }
94 
96 {
97  d->studies.append(study);
98 }
99 
101 {
102  d->studies.removeAt(index);
103 }
virtual ~QtDcmPatient()
Default destructor.
void removeStudy(int index)
Remove study at position index.
QString name() const
Patient name getter.
QString gender() const
Patient sex getter.
QtDcmPatient()
Default constructor.
void setBirthdate(const QString &birthdate)
Patient birthdate setter.
This class is a representation of a dicom patient.
Definition: QtDcmPatient.h:31
QString name
Patient dicom identificator.
void setStudies(const QList< QtDcmStudy > &studies)
Patient studies list setter.
void setName(const QString &name)
Patient name setter.
void addStudy(const QtDcmStudy &study)
Add study in the list.
QString id() const
Id getter.
QString birthdate() const
Patient birthdate getter.
QList< QtDcmStudy > studies
Patient sex.
void setId(const QString &id)
Id setter.
This class is representation of a Dicom study.
Definition: QtDcmStudy.h:33
QString sex
Patient birth date.
QList< QtDcmStudy > studies() const
Patient studies list getter.
QString birthdate
Patient name as found in the dicom format.
void setGender(const QString &sex)
Patient sex setter.