comparison Sources/StructurePolygon.h @ 33:2460b376d3f7

reorganization
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 04 Apr 2024 18:50:11 +0200
parents
children
comparison
equal deleted inserted replaced
32:976da5476810 33:2460b376d3f7
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 "Extent2D.h"
28 #include "Vector3D.h"
29
30 #include <DicomParsing/ParsedDicomFile.h>
31
32
33 class StructurePolygon : public boost::noncopyable
34 {
35 private:
36 std::string roiName_;
37 std::string referencedSopInstanceUid_;
38 uint8_t red_;
39 uint8_t green_;
40 uint8_t blue_;
41 std::vector<Vector3D> points_;
42
43 public:
44 StructurePolygon(Orthanc::ParsedDicomFile& dicom,
45 unsigned long roiIndex,
46 unsigned long contourIndex);
47
48 const std::string& GetRoiName() const
49 {
50 return roiName_;
51 }
52
53 const std::string& GetReferencedSopInstanceUid() const
54 {
55 return referencedSopInstanceUid_;
56 }
57
58 size_t GetPointsCount() const
59 {
60 return points_.size();
61 }
62
63 const Vector3D& GetPoint(size_t i) const;
64
65 bool IsCoplanar(Vector3D& normal) const;
66
67 void Add(Extent2D& extent,
68 const Vector3D& axisX,
69 const Vector3D& axisY) const;
70 };