boundingbox.hh
Go to the documentation of this file.
/* -*- mia-c++ -*-
*
* This file is part of MIA - a toolbox for medical image analysis
* Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
*
* MIA is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MIA; if not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef __mia_2d_boundingbox_hh
#define __mia_2d_boundingbox_hh
#include <mia/2d/vector.hh>
#include <mia/2d/defines2d.hh>
NS_MIA_BEGIN
typedef T2DVector<int> C2DIVector;
class EXPORT_2D C2DBoundingBox
{
public:
C2DBoundingBox();
C2DBoundingBox(const C2DFVector& begin, const C2DFVector& end);
void unite(const C2DBoundingBox& other);
void add(const C2DFVector& point);
C2DIVector get_grid_begin() const;
C2DIVector get_grid_end() const;
C2DBounds get_grid_size() const;
C2DFVector get_begin() const;
C2DFVector get_end() const;
C2DFVector get_size() const;
void enlarge(float boundary);
bool empty() const;
private:
bool m_empty;
C2DFVector m_begin;
C2DFVector m_end;
};
NS_MIA_END
#endif
vector.hh
C2DBounds
T2DVector< unsigned int > C2DBounds
unsigned int valued 2D vector - used as 2D size parameter
Definition 2d/vector.hh:540
C2DFVector
T2DVector< float > C2DFVector
float valued 2D vector
Definition 2d/vector.hh:534
C2DIVector
T2DVector< int > C2DIVector
a 2D int vector
Definition boundingbox.hh:31
C2DBoundingBox::get_size
C2DFVector get_size() const
C2DBoundingBox::unite
void unite(const C2DBoundingBox &other)
C2DBoundingBox::enlarge
void enlarge(float boundary)
C2DBoundingBox::add
void add(const C2DFVector &point)
C2DBoundingBox::empty
bool empty() const
C2DBoundingBox::get_grid_size
C2DBounds get_grid_size() const
C2DBoundingBox::C2DBoundingBox
C2DBoundingBox()
C2DBoundingBox::get_grid_begin
C2DIVector get_grid_begin() const
C2DBoundingBox::get_begin
C2DFVector get_begin() const
C2DBoundingBox::get_grid_end
C2DIVector get_grid_end() const
C2DBoundingBox::C2DBoundingBox
C2DBoundingBox(const C2DFVector &begin, const C2DFVector &end)
C2DBoundingBox::get_end
C2DFVector get_end() const
T2DVector
a 2D vector
Definition 2d/vector.hh:47
defines2d.hh
EXPORT_2D
#define EXPORT_2D
Definition defines2d.hh:37
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition defines.hh:33
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition defines.hh:36