MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
mitkCvMatFromVnlVector.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 mitkCvMatFromVnlVector_h
13#define mitkCvMatFromVnlVector_h
14
15#include <mitkEndoMacros.h>
16#include <vnl/vnl_vector.h>
18
19namespace mitk
20{
28 template <class T>
30 virtual public Algorithm
31 {
32 public:
37 const vnl_vector<T>* _VnlVector,
38 cv::Mat* _CvMat):
39 m_CvMatFromVnlMatrix(&m_VnlMatrix, _CvMat),
40 m_VnlVector(_VnlVector)
41 {
42 }
43
47 void Update() override
48 {
49 m_VnlMatrix.set_size( m_VnlVector->size(), 1 );
50 m_VnlMatrix.set_column(0, *m_VnlVector);
51 m_CvMatFromVnlMatrix.Update();
52 }
53 private:
57 vnl_matrix<T> m_VnlMatrix;
61 mitk::CvMatFromVnlMatrix<T> m_CvMatFromVnlMatrix;
65 const vnl_vector<T>* m_VnlVector;
66 };
67} // namespace mitk
68
69#endif
CvMatFromVnlVector(const vnl_vector< T > *_VnlVector, cv::Mat *_CvMat)
IGT Exceptions.