Mercurial > hg > orthanc-stl
comparison Sources/StructureSet.h @ 35:ee3bc8f7df5b
reorganization
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 04 Apr 2024 20:37:08 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
34:bee2017f3088 | 35:ee3bc8f7df5b |
---|---|
1 /** | |
2 * SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium | |
3 * SPDX-License-Identifier: GPL-3.0-or-later | |
4 */ | |
5 | |
6 /** | |
7 * STL plugin for Orthanc | |
8 * Copyright (C) 2023-2024 Sebastien Jodogne, UCLouvain, Belgium | |
9 * | |
10 * This program is free software: you can redistribute it and/or | |
11 * modify it under the terms of the GNU General Public License as | |
12 * published by the Free Software Foundation, either version 3 of the | |
13 * License, or (at your option) any later version. | |
14 * | |
15 * This program is distributed in the hope that it will be useful, but | |
16 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
18 * General Public License for more details. | |
19 * | |
20 * You should have received a copy of the GNU General Public License | |
21 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
22 **/ | |
23 | |
24 | |
25 #pragma once | |
26 | |
27 #include "StructurePolygon.h" | |
28 | |
29 class StructureSet : public boost::noncopyable | |
30 { | |
31 private: | |
32 std::vector<StructurePolygon*> polygons_; | |
33 std::string patientId_; | |
34 std::string studyInstanceUid_; | |
35 std::string seriesInstanceUid_; | |
36 std::string sopInstanceUid_; | |
37 bool hasFrameOfReferenceUid_; | |
38 std::string frameOfReferenceUid_; | |
39 | |
40 public: | |
41 explicit StructureSet(Orthanc::ParsedDicomFile& dicom); | |
42 | |
43 ~StructureSet(); | |
44 | |
45 const std::string& GetPatientId() const | |
46 { | |
47 return patientId_; | |
48 } | |
49 | |
50 const std::string& GetStudyInstanceUid() const | |
51 { | |
52 return studyInstanceUid_; | |
53 } | |
54 | |
55 const std::string& GetSeriesInstanceUid() const | |
56 { | |
57 return seriesInstanceUid_; | |
58 } | |
59 | |
60 const std::string& GetSopInstanceUid() const | |
61 { | |
62 return sopInstanceUid_; | |
63 } | |
64 | |
65 std::string HashStudy() const; | |
66 | |
67 size_t GetPolygonsCount() const | |
68 { | |
69 return polygons_.size(); | |
70 } | |
71 | |
72 const StructurePolygon& GetPolygon(size_t i) const; | |
73 | |
74 bool HasFrameOfReferenceUid() const | |
75 { | |
76 return hasFrameOfReferenceUid_; | |
77 } | |
78 | |
79 const std::string& GetFrameOfReferenceUid() const; | |
80 | |
81 // This static method is faster than constructing the full "StructureSet" object | |
82 static void ListStructuresNames(std::set<std::string>& target, | |
83 Orthanc::ParsedDicomFile& source); | |
84 }; |