3d/transformio.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_3d_transformio_hh
#define mia_3d_transformio_hh
#include <mia/core/iohandler.hh>
#include <mia/core/ioplugin.hh>
#include <mia/3d/transform.hh>
NS_MIA_BEGIN
typedef TIOPlugin<C3DTransformation> C3DTransformationIO;
extern template class EXPORT_3D TPlugin<C3DTransformation, io_plugin_type>;
extern template class EXPORT_3D TIOPlugin<C3DTransformation>;
class EXPORT_3D C3DTransformIOPluginHandlerImpl: public TIOPluginHandler<C3DTransformationIO>
{
protected:
C3DTransformIOPluginHandlerImpl();
};
extern template class EXPORT_3D THandlerSingleton< C3DTransformIOPluginHandlerImpl >;
typedef THandlerSingleton< C3DTransformIOPluginHandlerImpl > C3DTransformationIOPluginHandler;
typedef C3DTransformationIOPluginHandler::Instance::DataKey C3DTransformationDataKey;
inline P3DTransformation load_3dtransform(const std::string& file)
{
return C3DTransformationIOPluginHandler::instance().load(file);
}
template <>
inline P3DTransformation load_transform<P3DTransformation>(const std::string& file)
{
return load_3dtransform(file);
}
inline bool save_transform(const std::string& file, const C3DTransformation& transform)
{
return C3DTransformationIOPluginHandler::instance().save(file, transform);
}
NS_MIA_END
#endif
transform.hh
C3DTransformIOPluginHandlerImpl::C3DTransformIOPluginHandlerImpl
C3DTransformIOPluginHandlerImpl()
C3DTransformation
This is the generic base class for 3D transformations.
Definition 3d/transform.hh:54
THandlerSingleton< C3DTransformIOPluginHandlerImpl >
THandlerSingleton< C3DTransformIOPluginHandlerImpl >::instance
static const C3DTransformIOPluginHandlerImpl & instance()
TIOPluginHandler::save
bool save(const std::string &fname, const Data &data) const
TIOPluginHandler< C3DTransformationIO >::TIOPluginHandler
TIOPluginHandler()
TIOPluginHandler::load
PData load(const std::string &fname) const
TIOPluginHandler< C3DTransformationIO >::DataKey
TDelayedParameter< PData > DataKey
Definition iohandler.hh:64
TIOPlugin
The templatex basis class of all IO plug-ins.
Definition ioplugin.hh:58
TPlugin
The generic base for all plug-ins.
Definition plugin_base.hh:172
EXPORT_3D
#define EXPORT_3D
Definition defines3d.hh:45
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
load_3dtransform
P3DTransformation load_3dtransform(const std::string &file)
convenienance function to load a transformation
Definition 3d/transformio.hh:71
C3DTransformationDataKey
C3DTransformationIOPluginHandler::Instance::DataKey C3DTransformationDataKey
data key type for temporary storage of 3D transformations
Definition 3d/transformio.hh:62
C3DTransformationIOPluginHandler
THandlerSingleton< C3DTransformIOPluginHandlerImpl > C3DTransformationIOPluginHandler
Plug-in handler for the transformation IO plug-ins.
Definition 3d/transformio.hh:56
load_transform< P3DTransformation >
P3DTransformation load_transform< P3DTransformation >(const std::string &file)
specialized version to load a transformation
Definition 3d/transformio.hh:83
save_transform
bool save_transform(const std::string &file, const C3DTransformation &transform)
convenienance function to save a transformation
Definition 3d/transformio.hh:95
C3DTransformationIO
TIOPlugin< C3DTransformation > C3DTransformationIO
Base class for the generic IO of transformations.
Definition 3d/transformio.hh:34
P3DTransformation
std::shared_ptr< C3DTransformation > P3DTransformation
pointer type for a 3D transformation
Definition 3d/transform.hh:43
iohandler.hh
ioplugin.hh