Developer documentation
Version 3.0.3-105-gd3941f44
study.h
Go to the documentation of this file.
1/* Copyright (c) 2008-2022 the MRtrix3 contributors.
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 *
7 * Covered Software is provided under this License on an "as is"
8 * basis, without warranty of any kind, either expressed, implied, or
9 * statutory, including, without limitation, warranties that the
10 * Covered Software is free of defects, merchantable, fit for a
11 * particular purpose or non-infringing.
12 * See the Mozilla Public License v. 2.0 for more details.
13 *
14 * For more details, see http://www.mrtrix.org/.
15 */
16
17#ifndef __file_dicom_study_h__
18#define __file_dicom_study_h__
19
20#include "memory.h"
21#include "file/dicom/series.h"
22
23namespace MR {
24 namespace File {
25 namespace Dicom {
26
27 class Patient;
28 class Series;
29
30 class Study : public vector<std::shared_ptr<Series>> { NOMEMALIGN
31 public:
32 Study (Patient* parent, const std::string& study_name, const std::string& study_ID,
33 const std::string& study_UID, const std::string& study_date, const std::string& study_time) :
34 patient (parent), name (study_name), ID (study_ID),
35 UID (study_UID), date (study_date), time (study_time) { }
36
38 std::string name, ID, UID, date, time;
39
40 std::shared_ptr<Series> find (const std::string& series_name, size_t series_number,
41 const std::string& image_type, const std::string& series_ref_UID,
42 const std::string& series_modality, const std::string& series_date,
43 const std::string& series_time);
44
45 bool operator< (const Study& s) const {
46 if (date != s.date)
47 return date < s.date;
48 if (time != s.time)
49 return time < s.time;
50 if (name != s.name)
51 return name < s.name;
52 if (ID != s.ID)
53 return ID < s.ID;
54 return UID < s.UID;
55 }
56 };
57
58
59 std::ostream& operator<< (std::ostream& stream, const Study& item);
60
61
62 }
63 }
64}
65
66
67#endif
68
69
70
std::string name
Definition: study.h:38
std::shared_ptr< Series > find(const std::string &series_name, size_t series_number, const std::string &image_type, const std::string &series_ref_UID, const std::string &series_modality, const std::string &series_date, const std::string &series_time)
std::string date
Definition: study.h:38
std::string UID
Definition: study.h:38
bool operator<(const Study &s) const
Definition: study.h:45
std::string ID
Definition: study.h:38
std::string time
Definition: study.h:38
Patient * patient
Definition: study.h:37
Study(Patient *parent, const std::string &study_name, const std::string &study_ID, const std::string &study_UID, const std::string &study_date, const std::string &study_time)
Definition: study.h:32
#define NOMEMALIGN
Definition: memory.h:22
std::ostream & operator<<(std::ostream &stream, const Patient &item)
Definition: base.h:24
Item item