Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
mia
3d
3d/timestep.hh
Go to the documentation of this file.
1
/* -*- mia-c++ -*-
2
*
3
* This file is part of MIA - a toolbox for medical image analysis
4
* Copyright (c) Leipzig, Madrid 1999-2013 Gert Wollny
5
*
6
* MIA is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with MIA; if not, see <http://www.gnu.org/licenses/>.
18
*
19
*/
20
21
#ifndef mia_3d_timestep_hh
22
#define mia_3d_timestep_hh
23
24
#include <
mia/core/factory.hh
>
25
#include <
mia/core/typedescr.hh
>
26
#include <
mia/3d/image.hh
>
27
28
NS_MIA_BEGIN
29
38
class
EXPORT_3D
C3DRegTimeStep
:
public
CProductBase
{
39
public
:
41
typedef
C3DImage
plugin_data
;
43
typedef
timestep_type
plugin_type
;
44
51
C3DRegTimeStep
(
float
min,
float
max);
52
53
virtual
~
C3DRegTimeStep
();
54
61
void
apply(
const
C3DFVectorfield
& infield,
C3DFVectorfield
& outfield,
float
scale);
62
68
float
calculate_pertuberation(
C3DFVectorfield
& io,
const
C3DFVectorfield
& shift)
const
;
69
75
bool
decrease();
76
80
void
increase();
81
88
float
get_delta(
float
maxshift)
const
;
89
98
bool
regrid_requested (
const
C3DFVectorfield
& b,
const
C3DFVectorfield
& v,
float
delta)
const
;
99
103
bool
has_regrid ()
const
;
104
105
private
:
106
virtual
float
do_calculate_pertuberation(
C3DFVectorfield
& io,
const
C3DFVectorfield
& shift)
const
= 0;
107
virtual
bool
do_regrid_requested (
const
C3DFVectorfield
& b,
const
C3DFVectorfield
& v,
float
delta)
const
= 0;
108
virtual
bool
do_has_regrid ()
const
= 0;
109
110
111
float
m_min;
112
float
m_max;
113
float
m_current;
114
float
m_step;
115
};
116
117
124
class
EXPORT_3D
C3DRegTimeStepPlugin
:
public
TFactory
<C3DRegTimeStep>
125
{
126
public
:
128
C3DRegTimeStepPlugin
(
const
char
*name);
129
protected
:
131
float
get_min_timestep()
const
;
133
float
get_max_timestep()
const
;
134
private
:
135
float
m_min;
136
float
m_max;
137
};
138
140
typedef
std::shared_ptr<C3DRegTimeStep >
P3DRegTimeStep
;
141
143
typedef
THandlerSingleton<TFactoryPluginHandler<C3DRegTimeStepPlugin>
>
C3DRegTimeStepPluginHandler
;
144
145
NS_MIA_END
146
147
#endif
Generated on Tue Oct 15 2013 13:56:37 by
1.8.4