2d/timestep.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_timestep_hh
#define mia_2d_timestep_hh
#include <mia/core/factory.hh>
#include <mia/core/typedescr.hh>
#include <mia/2d/image.hh>
#include <mia/2d/transform.hh>
NS_MIA_BEGIN
class EXPORT_2D C2DRegTimeStep : public CProductBase
{
public:
typedef C2DImage plugin_data;
typedef timestep_type plugin_type;
C2DRegTimeStep(float min, float max);
virtual ~C2DRegTimeStep();
float calculate_pertuberation(C2DFVectorfield& io,
const C2DTransformation& shift) const;
bool regrid_requested(const C2DTransformation& b, const C2DFVectorfield& v,
float delta) const;
bool decrease();
void increase();
float get_delta(float maxshift) const;
bool has_regrid () const;
private:
virtual float do_calculate_pertuberation(C2DFVectorfield& io,
const C2DTransformation& shift) const = 0;
virtual bool do_regrid_requested (const C2DTransformation& b,
const C2DFVectorfield& v, float delta) const = 0;
virtual bool do_has_regrid () const = 0;
float m_min;
float m_max;
float m_current;
};
typedef std::shared_ptr<C2DRegTimeStep > P2DRegTimeStep;
class EXPORT_2D C2DRegTimeStepPlugin : public TFactory<C2DRegTimeStep>
{
public:
C2DRegTimeStepPlugin(const char *name);
protected:
float get_min_timestep() const;
float get_max_timestep() const;
private:
float m_min;
float m_max;
};
typedef THandlerSingleton<TFactoryPluginHandler<C2DRegTimeStepPlugin>>
C2DRegTimeStepPluginHandler;
NS_MIA_END
#endif
image.hh
P2DRegTimeStep
std::shared_ptr< C2DRegTimeStep > P2DRegTimeStep
pointer type for the 2D registration time step
Definition 2d/timestep.hh:121
C2DRegTimeStepPluginHandler
THandlerSingleton< TFactoryPluginHandler< C2DRegTimeStepPlugin > > C2DRegTimeStepPluginHandler
Definition 2d/timestep.hh:154
transform.hh
C2DFVectorfield
a 2D field of floating point single accuracy 2D vectors
Definition 2d/vectorfield.hh:80
C2DImage
This is the base class for 2D images that can hold generic pixel data.
Definition 2d/image.hh:48
C2DRegTimeStepPlugin::C2DRegTimeStepPlugin
C2DRegTimeStepPlugin(const char *name)
C2DRegTimeStepPlugin::get_max_timestep
float get_max_timestep() const
C2DRegTimeStepPlugin::get_min_timestep
float get_min_timestep() const
C2DRegTimeStep::decrease
bool decrease()
C2DRegTimeStep::plugin_type
timestep_type plugin_type
plugin search path plugin type component helper
Definition 2d/timestep.hh:49
C2DRegTimeStep::plugin_data
C2DImage plugin_data
plugin search path data component helper
Definition 2d/timestep.hh:46
C2DRegTimeStep::has_regrid
bool has_regrid() const
C2DRegTimeStep::regrid_requested
bool regrid_requested(const C2DTransformation &b, const C2DFVectorfield &v, float delta) const
C2DRegTimeStep::increase
void increase()
increase thetime step by multiplying with 1.5
C2DRegTimeStep::calculate_pertuberation
float calculate_pertuberation(C2DFVectorfield &io, const C2DTransformation &shift) const
C2DRegTimeStep::get_delta
float get_delta(float maxshift) const
C2DRegTimeStep::~C2DRegTimeStep
virtual ~C2DRegTimeStep()
C2DRegTimeStep::C2DRegTimeStep
C2DRegTimeStep(float min, float max)
C2DTransformation
This is the generic base class for 2D transformations.
Definition 2d/transform.hh:46
CProductBase
The base class for all plug-in created object.
Definition product_base.hh:41
TFactory< C2DRegTimeStep >::TFactory
TFactory(char const *const name)
Definition factory.hh:173
THandlerSingleton
the singleton that a plug-in handler really is
Definition handler.hh:159
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
typedescr.hh