ITK  4.9.0
Insight Segmentation and Registration Toolkit
Public Types | Static Public Member Functions | Static Public Attributes | Private Member Functions | List of all members
itk::PyBuffer< TImage > Class Template Reference

#include <itkPyBuffer.h>

Detailed Description

template<typename TImage>
class itk::PyBuffer< TImage >

Helper class for converting C buffers into python arrays.

This class will receive a C buffer and create the equivalent python array. This permits passing image buffers into python arrays from the NumPy python package.

Definition at line 50 of file itkPyBuffer.h.

Public Types

typedef
DefaultConvertPixelTraits
< PixelType >::ComponentType 
ComponentType
 
typedef ImageType::Pointer ImagePointer
 
typedef TImage ImageType
 
typedef ImageType::IndexType IndexType
 
typedef Image< ComponentType,
ImageDimension >::Pointer 
OutputImagePointer
 
typedef ImageType::PixelType PixelType
 
typedef ImageType::PointType PointType
 
typedef ImageType::RegionType RegionType
 
typedef PyBuffer Self
 
typedef ImageType::SizeType SizeType
 
typedef ImageType::SpacingType SpacingType
 

Static Public Member Functions

static PyObject * GetArrayFromImage (ImageType *image, bool keepAxes=false)
 
static const OutputImagePointer GetImageFromArray (PyObject *obj)
 

Static Public Attributes

static const unsigned int ImageDimension = ImageType::ImageDimension
 

Private Member Functions

void operator= (const Self &)
 
 PyBuffer (const Self &)
 

Member Typedef Documentation

template<typename TImage >
typedef DefaultConvertPixelTraits<PixelType>::ComponentType itk::PyBuffer< TImage >::ComponentType

Definition at line 65 of file itkPyBuffer.h.

template<typename TImage >
typedef ImageType::Pointer itk::PyBuffer< TImage >::ImagePointer

Definition at line 64 of file itkPyBuffer.h.

template<typename TImage >
typedef TImage itk::PyBuffer< TImage >::ImageType

Type of the image from which the buffer will be converted

Definition at line 57 of file itkPyBuffer.h.

template<typename TImage >
typedef ImageType::IndexType itk::PyBuffer< TImage >::IndexType

Definition at line 60 of file itkPyBuffer.h.

template<typename TImage >
typedef Image< ComponentType, ImageDimension >::Pointer itk::PyBuffer< TImage >::OutputImagePointer

Definition at line 70 of file itkPyBuffer.h.

template<typename TImage >
typedef ImageType::PixelType itk::PyBuffer< TImage >::PixelType

Definition at line 58 of file itkPyBuffer.h.

template<typename TImage >
typedef ImageType::PointType itk::PyBuffer< TImage >::PointType

Definition at line 62 of file itkPyBuffer.h.

template<typename TImage >
typedef ImageType::RegionType itk::PyBuffer< TImage >::RegionType

Definition at line 61 of file itkPyBuffer.h.

template<typename TImage >
typedef PyBuffer itk::PyBuffer< TImage >::Self

Standard "Self" typedef.

Definition at line 54 of file itkPyBuffer.h.

template<typename TImage >
typedef ImageType::SizeType itk::PyBuffer< TImage >::SizeType

Definition at line 59 of file itkPyBuffer.h.

template<typename TImage >
typedef ImageType::SpacingType itk::PyBuffer< TImage >::SpacingType

Definition at line 63 of file itkPyBuffer.h.

Constructor & Destructor Documentation

template<typename TImage >
itk::PyBuffer< TImage >::PyBuffer ( const Self )
private

Member Function Documentation

template<typename TImage >
static PyObject* itk::PyBuffer< TImage >::GetArrayFromImage ( ImageType image,
bool  keepAxes = false 
)
static

Get an Array with the content of the image buffer

template<typename TImage >
static const OutputImagePointer itk::PyBuffer< TImage >::GetImageFromArray ( PyObject *  obj)
static

Get an ITK image from a Python array

template<typename TImage >
void itk::PyBuffer< TImage >::operator= ( const Self )
private

Member Data Documentation

template<typename TImage >
const unsigned int itk::PyBuffer< TImage >::ImageDimension = ImageType::ImageDimension
static

Image dimension.

Definition at line 68 of file itkPyBuffer.h.


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