[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

details Create BasicImageView from MultiArrayViews VIGRA

Functions

template<class T , class Stride >
BasicImageView< T > makeBasicImageView (MultiArrayView< 2, T, Stride > const &array)
 
template<class T >
BasicImageView< T > makeBasicImageView (MultiArray< 3, T > const &array)
 
template<class T , class Stride >
BasicImageView< RGBValue< T > > makeRGBImageView (MultiArrayView< 3, T, Stride > const &array)
 

Detailed Description

Some convenience functions for wrapping a vigra::MultiArrayView's data in a vigra::BasicImageView.

Function Documentation

BasicImageView<T> vigra::makeBasicImageView ( MultiArrayView< 2, T, Stride > const &  array)

Create a vigra::BasicImageView from an unstrided 2-dimensional vigra::MultiArrayView.

The vigra::BasicImageView will have the same value_type as the original vigra::MultiArrayView.

BasicImageView<T> vigra::makeBasicImageView ( MultiArray< 3, T > const &  array)

Create a vigra::BasicImageView from a 3-dimensional vigra::MultiArray.

This wrapper flattens the two innermost dimensions of the array into single rows of the resulting image. The vigra::BasicImageView will have the same value_type as the original vigra::MultiArray.

BasicImageView<RGBValue<T> > vigra::makeRGBImageView ( MultiArrayView< 3, T, Stride > const &  array)

Create a vigra::BasicImageView from a 3-dimensional vigra::MultiArray.

This wrapper only works if T is a scalar type and the array's innermost dimension has size 3. It then re-interprets the data array as a 2-dimensional array with value_type RGBValue<T>.

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de)
Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany

html generated using doxygen and Python
vigra 1.11.1 (Fri May 19 2017)