ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itk::PyVnl< TElement > Class Template Reference

#include <itkPyVnl.h>

Detailed Description

template<typename TElement>
class itk::PyVnl< TElement >

Helper class get views of VNL data buffers in python arrays and back.

This class will either receive a VNL data structure and create the equivalent Python array view or will receive a Python array and create a copy of it in a VNL data structure. This permits passing VNL data structures into python arrays from the NumPy python package.

Definition at line 46 of file itkPyVnl.h.

Public Types

using DataType = TElement
 
using MatrixType = vnl_matrix<TElement>
 
using Self = PyVnl
 
using VectorType = vnl_vector<TElement>
 

Static Public Member Functions

static PyObject * _GetArrayViewFromVnlMatrix (MatrixType *matrix)
 
static PyObject * _GetArrayViewFromVnlVector (VectorType *vector)
 
static MatrixType _GetVnlMatrixFromArray (PyObject *arr, PyObject *shape)
 
static VectorType _GetVnlVectorFromArray (PyObject *arr, PyObject *shape)
 

Member Typedef Documentation

◆ DataType

template<typename TElement>
using itk::PyVnl< TElement >::DataType = TElement

Type of the data from which the buffer will be converted

Definition at line 53 of file itkPyVnl.h.

◆ MatrixType

template<typename TElement>
using itk::PyVnl< TElement >::MatrixType = vnl_matrix<TElement>

Definition at line 55 of file itkPyVnl.h.

◆ Self

template<typename TElement>
using itk::PyVnl< TElement >::Self = PyVnl

Standard "Self" type alias.

Definition at line 50 of file itkPyVnl.h.

◆ VectorType

template<typename TElement>
using itk::PyVnl< TElement >::VectorType = vnl_vector<TElement>

Definition at line 54 of file itkPyVnl.h.

Member Function Documentation

◆ _GetArrayViewFromVnlMatrix()

template<typename TElement>
static PyObject * itk::PyVnl< TElement >::_GetArrayViewFromVnlMatrix ( MatrixType * matrix)
static

Get an Array with the content of the vnl matrix

◆ _GetArrayViewFromVnlVector()

template<typename TElement>
static PyObject * itk::PyVnl< TElement >::_GetArrayViewFromVnlVector ( VectorType * vector)
static

Get an Array with the content of the vnl vector

◆ _GetVnlMatrixFromArray()

template<typename TElement>
static MatrixType itk::PyVnl< TElement >::_GetVnlMatrixFromArray ( PyObject * arr,
PyObject * shape )
static

Get a vnl matrix from a Python array

◆ _GetVnlVectorFromArray()

template<typename TElement>
static VectorType itk::PyVnl< TElement >::_GetVnlVectorFromArray ( PyObject * arr,
PyObject * shape )
static

Get a vnl vector from a Python array


The documentation for this class was generated from the following file: