16 #ifndef mitkVnlVectorCaster_h
17 #define mitkVnlVectorCaster_h
19 #include <vnl/vnl_vector.h>
29 template <
class T,
class R>
38 const vnl_vector<T>* _InputVector,
39 vnl_vector<R>* _OutputVector):
40 m_InputVector(_InputVector),
41 m_OutputVector(_OutputVector)
49 const vnl_vector<T>& _InputVector,
50 vnl_vector<R>& _OutputVector)
52 for(
size_t i=0; i<_InputVector.size(); ++i )
53 _OutputVector[i] = static_cast<R>( _InputVector[i] );
61 Update( *m_InputVector, *m_OutputVector );
67 const vnl_vector<T>* m_InputVector;
71 vnl_vector<R>* m_OutputVector;
75 #endif // mitkVnlVectorCaster_h
DataCollection - Class to facilitate loading/accessing structured data.
static void Update(const vnl_vector< T > &_InputVector, vnl_vector< R > &_OutputVector)
VnlVectorCaster(const vnl_vector< T > *_InputVector, vnl_vector< R > *_OutputVector)