Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkCvMatFromVnlVector.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 mitkCvMatFromVnlVector_h
13 #define mitkCvMatFromVnlVector_h
14 
15 #include <mitkEndoMacros.h>
16 #include <vnl/vnl_vector.h>
17 #include <mitkCvMatFromVnlMatrix.h>
18 
19 namespace 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
mitk::CvMatFromVnlVector::CvMatFromVnlVector
CvMatFromVnlVector(const vnl_vector< T > *_VnlVector, cv::Mat *_CvMat)
Definition: mitkCvMatFromVnlVector.h:36
mitk::CvMatFromVnlVector::Update
void Update() override
Definition: mitkCvMatFromVnlVector.h:47
mitk::CvMatFromVnlMatrix
Definition: mitkCvMatFromVnlMatrix.h:32
mitkCvMatFromVnlMatrix.h
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::Algorithm
Definition: mitkAlgorithm.h:22
mitkEndoMacros.h
mitk::CvMatFromVnlVector
Definition: mitkCvMatFromVnlVector.h:29