MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkVnlVectorFixedCaster.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found 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
19namespace mitk
20{
25 template <class T, class R, unsigned int n>
27 virtual public Algorithm
28 {
29 public:
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
VnlVectorFixedCaster(const vnl_vector_fixed< T, n > *_InputVector, vnl_vector_fixed< R, n > *_OutputVector)
IGT Exceptions.