ODIN
study.h
1 /***************************************************************************
2  study.h - description
3  -------------------
4  begin : Mon Mar 3 2003
5  copyright : (C) 2000-2021 by Thies H. Jochimsen
6  email : thies@jochimsen.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef STUDY_H
19 #define STUDY_H
20 
21 #include <odinpara/ldrblock.h>
22 #include <odinpara/ldrtypes.h>
23 #include <odinpara/ldrnumbers.h>
24 
25 
26 #define ODIN_DATE_LENGTH 8
27 #define ODIN_DATE_FORMAT "%Y%m%d"
28 #define ODIN_TIME_LENGTH 6
29 #define ODIN_TIME_FORMAT "%H%M%S"
30 
31 
39 class Study : public LDRblock {
40 
41  public:
42 
46  Study(const STD_string& label="unnamedStudy");
47 
51  Study(const Study& s);
52 
53 
59  Study& set_DateTime(const STD_string& date, const STD_string& time);
60 
64  void get_DateTime(STD_string& date, STD_string& time) const;
65 
69  void set_timestamp();
70 
71 
81  Study& set_Patient(const STD_string& id, const STD_string& full_name, const STD_string& birth_date, char sex, float weight, float size);
82 
86  void get_Patient(STD_string& id, STD_string& full_name, STD_string& birth_date, char& sex, float& weight, float& size) const;
87 
88 
94  Study& set_Context(const STD_string& description, const STD_string& scientist);
95 
99  void get_Context(STD_string& description, STD_string& scientist) const;
100 
101 
107  Study& set_Series(const STD_string& description, int number);
108 
112  void get_Series(STD_string& description, int& number) const;
113 
114 
118  Study& operator = (const Study& s);
119 
120 
121 
122  private:
123  void append_all_members();
124 
125  static void format_date(STD_string& result, const STD_string& date);
126  static void format_time(STD_string& result, const STD_string& time);
127 
128  LDRstring ScanDate;
129  LDRstring ScanTime;
130 
131  LDRstring PatientId;
132  LDRstring PatientName;
133  LDRstring PatientBirthDate;
134  LDRenum PatientSex;
135  LDRfloat PatientWeight;
136  LDRfloat PatientSize;
137 
138  LDRstring Description;
139  LDRstring ScientistName;
140 
141  LDRstring SeriesDescription;
142  LDRint SeriesNumber;
143 
144 };
145 
146 
147 #endif
unsigned int size() const
Definition: tjlist.h:145
Study information.
Definition: study.h:39
Study & set_Patient(const STD_string &id, const STD_string &full_name, const STD_string &birth_date, char sex, float weight, float size)
Study(const Study &s)
void get_Series(STD_string &description, int &number) const
void get_Patient(STD_string &id, STD_string &full_name, STD_string &birth_date, char &sex, float &weight, float &size) const
Study & set_DateTime(const STD_string &date, const STD_string &time)
Study & operator=(const Study &s)
Study & set_Context(const STD_string &description, const STD_string &scientist)
void get_DateTime(STD_string &date, STD_string &time) const
void set_timestamp()
Study & set_Series(const STD_string &description, int number)
Study(const STD_string &label="unnamedStudy")
void get_Context(STD_string &description, STD_string &scientist) const