Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
mia
3d
linear_transform.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_linear_transform_hh
22
#define mia_3d_linear_transform_hh
23
24
25
#include <
mia/3d/transform.hh
>
26
27
NS_MIA_BEGIN
28
29
class
EXPORT_3D
C3DLinearTransform
:
public
C3DTransformation
{
30
public
:
31
C3DLinearTransform
();
32
C3DLinearTransform
(
const
C3DBounds
& size,
const
C3DInterpolatorFactory
& ipf);
33
virtual
C3DTransformation
*
invert
()
const
;
34
virtual
size_t
degrees_of_freedom
()
const
;
35
virtual
void
set_identity
();
36
virtual
C3DFMatrix
derivative_at
(
const
C3DFVector
& x)
const
;
37
virtual
C3DFMatrix
derivative_at
(
int
x,
int
y,
int
z)
const
;
38
virtual
void
translate
(
const
C3DFVectorfield
& gradient,
CDoubleVector
& params)
const
;
39
virtual
float
get_max_transform
()
const
;
40
virtual
CDoubleVector
get_parameters
()
const
;
41
virtual
void
set_parameters
(
const
CDoubleVector
& params);
42
virtual
const
C3DBounds
&
get_size
()
const
;
43
virtual
float
pertuberate
(
C3DFVectorfield
& v)
const
;
44
virtual
C3DFVector
apply
(
const
C3DFVector
& x)
const
;
45
virtual
C3DFVector
operator ()
(
const
C3DFVector
& x)
const
;
46
virtual
float
get_jacobian
(
const
C3DFVectorfield
& v,
float
delta)
const
;
47
49
virtual
void
add(
const
C3DTransformation
& a);
50
virtual
void
update
(
float
step,
const
C3DFVectorfield
& a);
51
virtual
float
divergence()
const
;
52
virtual
float
curl()
const
;
53
virtual
double
get_divcurl_cost
(
double
wd,
double
wr,
CDoubleVector
& gradient)
const
;
54
double
get_divcurl_cost
(
double
wd,
double
wr)
const
;
55
56
virtual
C3DTransformation::const_iterator
begin
()
const
;
57
virtual
C3DTransformation::const_iterator
end
()
const
;
58
virtual
C3DTransformation::const_iterator
begin_range
(
const
C3DBounds
& begin,
const
C3DBounds
& end)
const
;
59
virtual
C3DTransformation::const_iterator
end_range
(
const
C3DBounds
& begin,
const
C3DBounds
& end)
const
;
60
61
protected
:
62
class
iterator_impl
:
public
C3DTransformation::iterator_impl
{
63
friend
class
C3DLinearTransform
;
64
iterator_impl
(
const
C3DBounds
& pos,
const
C3DBounds
& size);
65
iterator_impl
(
const
C3DBounds
& pos,
const
C3DBounds
& size,
66
const
C3DBounds
& begin,
const
C3DBounds
& end);
67
68
C3DTransformation::iterator_impl
*
clone
()
const
;
69
virtual
const
C3DFVector
& do_get_value()
const
;
70
virtual
void
do_x_increment();
71
virtual
void
do_y_increment();
72
virtual
void
do_z_increment();
73
C3DFVector
m_value;
74
};
75
76
private
:
77
virtual
P3DTransformation
do_upscale(
const
C3DBounds
& size)
const
;
78
virtual
C3DTransformation
*do_clone()
const
;
79
virtual
P3DImage
do_transform(
const
C3DImage
& src,
const
C3DInterpolatorFactory
&)
const
;
80
std::vector<double> m_matrix;
81
C3DBounds
m_size;
82
83
};
84
85
NS_MIA_END
86
87
#endif
Generated on Tue Oct 15 2013 13:56:37 by
1.8.4