MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkVnlVectorFixedCaster.h
Go to the documentation of this file.
1
/*============================================================================
2
3
The Medical Imaging Interaction Toolkit (MITK)
4
5
Copyright (c) German Cancer Research Center (DKFZ)
6
All rights reserved.
7
8
Use of this source code is governed by a 3-clause BSD license that can be
9
found in the LICENSE file.
10
11
============================================================================*/
12
#ifndef mitkVnlVectorFixedCaster_h
13
#define mitkVnlVectorFixedCaster_h
14
15
#include <vnl/vnl_vector_fixed.h>
16
#include <
mitkObservable.h
>
17
#include <
mitkAlgorithm.h
>
18
19
namespace
mitk
20
{
25
template
<
class
T,
class
R,
unsigned
int
n>
26
class
VnlVectorFixedCaster
:
27
virtual
public
Algorithm
28
{
29
public
:
33
VnlVectorFixedCaster
(
34
const
vnl_vector_fixed<T, n>* _InputVector,
35
vnl_vector_fixed<R, n>* _OutputVector):
36
m_InputVector(_InputVector),
37
m_OutputVector(_OutputVector)
38
{
39
}
43
void
Update
()
override
44
{
45
for
(
size_t
i=0; i<m_InputVector->size(); ++i )
46
(*m_OutputVector)[i] =
static_cast<
R
>
( (*m_InputVector)[i] );
47
48
}
49
private
:
53
const
vnl_vector_fixed<T, n>* m_InputVector;
57
vnl_vector_fixed<R, n>* m_OutputVector;
58
};
59
}
// namespace mitk
60
61
#endif
mitk::Algorithm
Definition
mitkAlgorithm.h:23
mitk::VnlVectorFixedCaster
Definition
mitkVnlVectorFixedCaster.h:28
mitk::VnlVectorFixedCaster::Update
void Update() override
Definition
mitkVnlVectorFixedCaster.h:43
mitk::VnlVectorFixedCaster::VnlVectorFixedCaster
VnlVectorFixedCaster(const vnl_vector_fixed< T, n > *_InputVector, vnl_vector_fixed< R, n > *_OutputVector)
Definition
mitkVnlVectorFixedCaster.h:33
mitkAlgorithm.h
mitkObservable.h
mitk
IGT Exceptions.
Definition
mitkAlgorithm.h:16
Modules
CameraCalibration
mitkVnlVectorFixedCaster.h
Generated by
1.12.0