My Project
segsection.hh
Go to the documentation of this file.
1/* -*- mia-c++ -*-
2 *
3 * This file is part of MIA - a toolbox for medical image analysis
4 * Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
5 *
6 * MIA is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with MIA; if not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21#ifndef SegSection_h
22#define SegSection_h
23
24#include <vector>
25#include <string>
26
27#include <mia/2d/segpoint.hh>
28#include <mia/2d/boundingbox.hh>
29#include <mia/2d/polygon.hh>
30
32
44{
45public:
47 typedef std::vector<CSegPoint2D> Points;
48
51
59 CSegSection(const std::string& id, const Points& points, bool is_open);
60
66 CSegSection(const CXMLElement& node, int version);
67
73 void write(CXMLElement& node, int version) const;
74
76 const std::string& get_id() const;
77
79 const Points& get_points()const;
80
83
88 void shift(const C2DFVector& delta);
89
95 float get_hausdorff_distance(const CSegSection& other) const;
96
101 void append_to(C2DPolygon& polygon)const;
102
108
114
120 void draw(C2DUBImage& output, unsigned char color)const;
121
127
129 bool is_open() const;
130
131private:
132 std::string m_id;
133 Points m_points;
134 bool m_is_open;
135};
136
138
139#endif
2D axis orthothogonal bounding box.
A simple 2D polygon class.
Definition polygon.hh:40
This is the generic base class for 2D transformations.
Segmentation class to represent a section of the LV myocardium.
Definition segsection.hh:44
const std::string & get_id() const
void draw_xor(C2DUBImage &output) const
float get_hausdorff_distance(const CSegSection &other) const
CSegSection()
default constructor
void draw(C2DUBImage &output, unsigned char color) const
const Points & get_points() const
CSegSection(const CXMLElement &node, int version)
void inv_transform(const C2DTransformation &t)
void write(CXMLElement &node, int version) const
std::vector< CSegPoint2D > Points
convenicence typedef for the points defining the section
Definition segsection.hh:47
void transform(const C2DTransformation &t)
void append_to(C2DPolygon &polygon) const
void shift(const C2DFVector &delta)
CSegSection(const std::string &id, const Points &points, bool is_open)
bool is_open() const
const C2DBoundingBox get_boundingbox() const
This class implements a facade for the xml Element.
This is the template version of a 2D image that is used for holding real data.
Definition 2d/image.hh:140
#define EXPORT_2D
Definition defines2d.hh:37
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition defines.hh:33
#define NS_MIA_END
conveniance define to end the mia namespace
Definition defines.hh:36