mesh/filter.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_mesh_filter_hh
#define mia_mesh_filter_hh
#include <mia/mesh/triangularMesh.hh>
#include <mia/core/factory.hh>
#include <mia/template/filter_chain.hh>
NS_MIA_BEGIN
typedef TDataFilter<CTriangleMesh> CMeshFilter;
typedef TDataFilterPlugin<CTriangleMesh> CMeshFilterPlugin;
typedef std::shared_ptr<CMeshFilter > PMeshFilter;
typedef THandlerSingleton<TFactoryPluginHandler<CMeshFilterPlugin>> CMeshFilterPluginHandler;
FACTORY_TRAIT(CMeshFilterPluginHandler);
inline PMeshFilter produce_mesh_filter(const char *descr)
{
return CMeshFilterPluginHandler::instance().produce(descr);
}
typedef TFilterChain<CMeshFilterPluginHandler> CMeshFilterChain;
PTriangleMesh EXPORT_MESH run_filter_chain(PTriangleMesh mesh, const std::vector<const char *>& filters);
PTriangleMesh EXPORT_MESH run_filter(const CTriangleMesh& mesh, const char *filter);
inline PTriangleMesh run_filter(PTriangleMesh mesh, const char *filter)
{
return run_filter(*mesh, filter);
}
NS_MIA_END
#endif
CTriangleMesh
A class to deine a triangle mesh with some attributes.
Definition triangularMesh.hh:62
TDataFilterPlugin
Generic image filter plugin base.
Definition core/filter.hh:186
TDataFilter
Generic interface class to data filters.
Definition core/filter.hh:87
TFilterChain
create and use a chain of filters
Definition filter_chain.hh:41
THandlerSingleton
the singleton that a plug-in handler really is
Definition handler.hh:159
THandlerSingleton< TFactoryPluginHandler< CMeshFilterPlugin > >::instance
static const TFactoryPluginHandler< CMeshFilterPlugin > & instance()
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
filter_chain.hh
run_filter
PTriangleMesh EXPORT_MESH run_filter(const CTriangleMesh &mesh, const char *filter)
CMeshFilterPluginHandler
THandlerSingleton< TFactoryPluginHandler< CMeshFilterPlugin > > CMeshFilterPluginHandler
Definition mesh/filter.hh:52
run_filter_chain
PTriangleMesh EXPORT_MESH run_filter_chain(PTriangleMesh mesh, const std::vector< const char * > &filters)
filter
static F::result_type filter(const F &f, const B &b)
Definition core/filter.hh:258
CMeshFilterChain
TFilterChain< CMeshFilterPluginHandler > CMeshFilterChain
Definition mesh/filter.hh:71
CMeshFilterPlugin
TDataFilterPlugin< CTriangleMesh > CMeshFilterPlugin
Definition mesh/filter.hh:40
PMeshFilter
std::shared_ptr< CMeshFilter > PMeshFilter
Definition mesh/filter.hh:46
FACTORY_TRAIT
#define FACTORY_TRAIT(F)
Definition factory_trait.hh:69
produce_mesh_filter
PMeshFilter produce_mesh_filter(const char *descr)
Definition mesh/filter.hh:61
CMeshFilter
TDataFilter< CTriangleMesh > CMeshFilter
Definition mesh/filter.hh:34
triangularMesh.hh
EXPORT_MESH
#define EXPORT_MESH
define visibility for proper export
Definition triangularMesh.hh:44
PTriangleMesh
CTriangleMesh::Pointer PTriangleMesh
Pointer type of the CTriangle mesh class.
Definition triangularMesh.hh:287