My Project
boundingbox.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 __mia_2d_boundingbox_hh
22#define __mia_2d_boundingbox_hh
23
24#include <mia/2d/vector.hh>
25#include <mia/2d/defines2d.hh>
26
27
29
32
33
39{
40public:
42
48 C2DBoundingBox(const C2DFVector& begin, const C2DFVector& end);
49
54 void unite(const C2DBoundingBox& other);
55
60 void add(const C2DFVector& point);
61
62
65
68
71
74
77
80
81
85 void enlarge(float boundary);
86
87
89 bool empty() const;
90
91private:
92 bool m_empty;
93 C2DFVector m_begin;
94 C2DFVector m_end;
95};
96
98
99#endif
T2DVector< int > C2DIVector
a 2D int vector
Definition: boundingbox.hh:31
2D axis orthothogonal bounding box.
Definition: boundingbox.hh:39
C2DFVector get_size() const
void unite(const C2DBoundingBox &other)
void enlarge(float boundary)
void add(const C2DFVector &point)
bool empty() const
C2DBounds get_grid_size() const
C2DIVector get_grid_begin() const
C2DFVector get_begin() const
C2DIVector get_grid_end() const
C2DBoundingBox(const C2DFVector &begin, const C2DFVector &end)
C2DFVector get_end() const
a 2D vector
Definition: 2d/vector.hh:47
#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