2d/shape.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_shape_hh
#define mia_2d_shape_hh
#include <mia/core/shape.hh>
#include <mia/core/factory.hh>
#include <mia/2d/image.hh>
NS_MIA_BEGIN
extern template class EXPORT_2D TShape<T2DVector, C2DBitImage>;
typedef TShape<T2DVector, C2DBitImage> C2DShape;
typedef std::shared_ptr<C2DShape > P2DShape;
typedef TFactory<C2DShape> C2DShapePlugin;
template <> const char *const TPluginHandler<TFactory<C2DShape>>::m_help;
typedef THandlerSingleton<TFactoryPluginHandler<C2DShapePlugin>> C2DShapePluginHandler;
P2DShape EXPORT_2D rotate_90_degree(const C2DShape& shape);
// Trait to make the shape definition parsable on the command line
FACTORY_TRAIT(C2DShapePluginHandler);
inline P2DShape produce_2d_shape(const std::string& descr)
{
return C2DShapePluginHandler::instance().produce(descr);
}
NS_MIA_END
#endif
image.hh
C2DShapePlugin
TFactory< C2DShape > C2DShapePlugin
Base class for Shape generating plug-ins.
Definition 2d/shape.hh:40
produce_2d_shape
P2DShape produce_2d_shape(const std::string &descr)
Definition 2d/shape.hh:60
P2DShape
std::shared_ptr< C2DShape > P2DShape
Pointer type of the C2DShape.
Definition 2d/shape.hh:37
C2DShapePluginHandler
THandlerSingleton< TFactoryPluginHandler< C2DShapePlugin > > C2DShapePluginHandler
Plug-in handler for the shape plug-ins.
Definition 2d/shape.hh:45
C2DShape
TShape< T2DVector, C2DBitImage > C2DShape
2D shape class, see also TShape
Definition 2d/shape.hh:34
rotate_90_degree
P2DShape EXPORT_2D rotate_90_degree(const C2DShape &shape)
m_help
const char *const TPluginHandler< CSplineBoundaryConditionPlugin >::m_help
Definition boundary_conditions.hh:199
TFactory
This is tha base of all plugins that create "things", like filters, cost functions time step operator...
Definition factory.hh:51
THandlerSingleton
the singleton that a plug-in handler really is
Definition handler.hh:159
THandlerSingleton< TFactoryPluginHandler< C2DShapePlugin > >::instance
static const TFactoryPluginHandler< C2DShapePlugin > & instance()
TPluginHandler
The basic template of all plugin handlers.
Definition handler.hh:57
TShape
a generic class for morphological shapes
Definition core/shape.hh:64
shape.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
factory.hh
FACTORY_TRAIT
#define FACTORY_TRAIT(F)
Definition factory_trait.hh:69