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

#include <itkPyVectorContainer.h>

Detailed Description

template<typename TElementIdentifier, typename TElement>
class itk::PyVectorContainer< TElementIdentifier, 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 44 of file itkPyVectorContainer.h.

Public Types

using DataType = TElement
 
using ElementIdentiferType = TElementIdentifier
 
using Self = PyVectorContainer
 
using VectorContainerType = VectorContainer<TElementIdentifier, TElement>
 

Static Public Member Functions

static PyObject * _array_view_from_vector_container (VectorContainerType *vector)
 
static VectorContainerType::Pointer _vector_container_from_array (PyObject *arr, PyObject *shape)
 

Member Typedef Documentation

◆ DataType

template<typename TElementIdentifier, typename TElement>
using itk::PyVectorContainer< TElementIdentifier, TElement >::DataType = TElement

Definition at line 52 of file itkPyVectorContainer.h.

◆ ElementIdentiferType

template<typename TElementIdentifier, typename TElement>
using itk::PyVectorContainer< TElementIdentifier, TElement >::ElementIdentiferType = TElementIdentifier

Type of the data from which the buffer will be converted

Definition at line 51 of file itkPyVectorContainer.h.

◆ Self

template<typename TElementIdentifier, typename TElement>
using itk::PyVectorContainer< TElementIdentifier, TElement >::Self = PyVectorContainer

Standard "Self" type alias.

Definition at line 48 of file itkPyVectorContainer.h.

◆ VectorContainerType

template<typename TElementIdentifier, typename TElement>
using itk::PyVectorContainer< TElementIdentifier, TElement >::VectorContainerType = VectorContainer<TElementIdentifier, TElement>

Definition at line 53 of file itkPyVectorContainer.h.

Member Function Documentation

◆ _array_view_from_vector_container()

template<typename TElementIdentifier, typename TElement>
static PyObject * itk::PyVectorContainer< TElementIdentifier, TElement >::_array_view_from_vector_container ( VectorContainerType * vector)
static

Get an Array with the content of the vnl vector

◆ _vector_container_from_array()

template<typename TElementIdentifier, typename TElement>
static VectorContainerType::Pointer itk::PyVectorContainer< TElementIdentifier, TElement >::_vector_container_from_array ( PyObject * arr,
PyObject * shape )
static

Get a vnl vector from a Python array


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