comparison OrthancStone/Sources/Toolbox/DicomStructuredReport.h @ 2085:554bc96e7508

added DicomStructuredReport
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 07 Nov 2023 17:03:38 +0100
parents
children 51c8b21b81e4
comparison
equal deleted inserted replaced
2083:0c0c228a3a73 2085:554bc96e7508
1 /**
2 * Stone of Orthanc
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
4 * Department, University Hospital of Liege, Belgium
5 * Copyright (C) 2017-2023 Osimis S.A., Belgium
6 * Copyright (C) 2021-2023 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
7 *
8 * This program is free software: you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public License
10 * as published by the Free Software Foundation, either version 3 of
11 * the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this program. If not, see
20 * <http://www.gnu.org/licenses/>.
21 **/
22
23
24 #pragma once
25
26 #if !defined(ORTHANC_ENABLE_DCMTK)
27 # error The macro ORTHANC_ENABLE_DCMTK must be defined
28 #endif
29
30 #if ORTHANC_ENABLE_DCMTK != 1
31 # error Support for DCMTK must be enabled
32 #endif
33
34 #include <DicomParsing/ParsedDicomFile.h>
35
36 #include <dcmtk/dcmdata/dcitem.h>
37
38 namespace OrthancStone
39 {
40 class DicomStructuredReport : public boost::noncopyable
41 {
42 private:
43 class Structure;
44 class Point;
45 class Polyline;
46
47 class ReferencedInstance
48 {
49 private:
50 std::string studyInstanceUid_;
51 std::string seriesInstanceUid_;
52 std::string sopClassUid_;
53
54 public:
55 ReferencedInstance(const std::string& studyInstanceUid,
56 const std::string& seriesInstanceUid,
57 const std::string& sopClassUid) :
58 studyInstanceUid_(studyInstanceUid),
59 seriesInstanceUid_(seriesInstanceUid),
60 sopClassUid_(sopClassUid)
61 {
62 }
63
64 ReferencedInstance()
65 {
66 }
67
68 const std::string& GetStudyInstanceUid() const
69 {
70 return studyInstanceUid_;
71 }
72
73 const std::string& GetSeriesInstanceUid() const
74 {
75 return seriesInstanceUid_;
76 }
77
78 const std::string& GetSopClassUid() const
79 {
80 return sopClassUid_;
81 }
82 };
83
84 void AddStructure(const std::string& sopInstanceUid,
85 DcmItem& group,
86 bool hasFrameNumber,
87 unsigned int frameNumber,
88 bool hasProbabilityOfCancer,
89 float probabilityOfCancer);
90
91 std::map<std::string, ReferencedInstance> instancesInformation_;
92 std::vector<std::string> orderedInstances_;
93 std::list<Structure*> structures_;
94
95 public:
96 DicomStructuredReport(Orthanc::ParsedDicomFile& dicom);
97
98 ~DicomStructuredReport();
99 };
100 }