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

Public Types | Public Member Functions | List of all members
BasicImageView< PIXELTYPE > Class Template Reference

BasicImage using foreign memory. More...

`#include <vigra/basicimageview.hxx>`

## Public Types

typedef IteratorTraits< traverser >::DefaultAccessor | Accessor
typedef traverser::column_iterator | column_iterator
typedef const_traverser::column_iterator | const_column_iterator
typedef PIXELTYPE const * | const_iterator
typedef PIXELTYPE const * | const_pointer
typedef PIXELTYPE const & | const_reference
typedef const_traverser::row_iterator | const_row_iterator
typedef ConstImageIterator< value_type > | const_traverser
typedef IteratorTraits< const_traverser >::DefaultAccessor | ConstAccessor
typedef ConstImageIterator< value_type > | ConstIterator
typedef PIXELTYPE const * | ConstScanOrderIterator
typedef Diff2D | difference_type
typedef ImageIterator< value_type > | Iterator
typedef PIXELTYPE * | iterator
typedef PIXELTYPE | PixelType
typedef PIXELTYPE * | pointer
typedef PIXELTYPE & | reference
typedef traverser::row_iterator | row_iterator
typedef PIXELTYPE * | ScanOrderIterator
typedef Size2D | size_type
typedef ImageIterator< value_type > | traverser
typedef PIXELTYPE | value_type

## Public Member Functions

Accessor | accessor ()
ConstAccessor | accessor () const
| BasicImageView ()
| BasicImageView (const_pointer data, difference_type const &size, std::ptrdiff_t stride=0)
| BasicImageView (const_pointer data, std::ptrdiff_t w, std::ptrdiff_t h, std::ptrdiff_t stride=0)
iterator | begin ()
const_iterator | begin () const
column_iterator | columnBegin (std::ptrdiff_t x)
const_column_iterator | columnBegin (std::ptrdiff_t x) const
column_iterator | columnEnd (std::ptrdiff_t x)
const_column_iterator | columnEnd (std::ptrdiff_t x) const
const_pointer | data () const
iterator | end ()
const_iterator | end () const
std::ptrdiff_t | height () const
BasicImageView & | init (value_type const &pixel)
bool | isInside (difference_type const &d) const
traverser | lowerRight ()
const_traverser | lowerRight () const
reference | operator() (std::ptrdiff_t dx, std::ptrdiff_t dy)
const_reference | operator() (std::ptrdiff_t dx, std::ptrdiff_t dy) const
reference | operator[] (difference_type const &d)
const_reference | operator[] (difference_type const &d) const
pointer | operator[] (std::ptrdiff_t dy)
const_pointer | operator[] (std::ptrdiff_t dy) const
row_iterator | rowBegin (std::ptrdiff_t y)
const_row_iterator | rowBegin (std::ptrdiff_t y) const
row_iterator | rowEnd (std::ptrdiff_t y)
const_row_iterator | rowEnd (std::ptrdiff_t y) const
size_type | size () const
std::ptrdiff_t | stride () const
traverser | upperLeft ()
const_traverser | upperLeft () const
std::ptrdiff_t | width () const

## Detailed Description

template<class PIXELTYPE>
class vigra::BasicImageView< PIXELTYPE >

BasicImage using foreign memory.

deprecated, use MultiArrayView instead

This class provides the same interface as BasicImage (with the exception of resize()) but the image's memory is provided from the outside instead of allocated internally.

A BasicImageView can also be created from a MultiArrayView with the appropriate shape – see Create BasicImageView from MultiArrayViews.

#include <vigra/basicimageview.hxx>
Namespace: vigra

## Member Typedef Documentation

## ◆ value_type

template<class PIXELTYPE>

typedef PIXELTYPE value_type

the BasicImageView's pixel type

## ◆ PixelType

template<class PIXELTYPE>

typedef PIXELTYPE PixelType

the BasicImageView's pixel type

## ◆ reference

template<class PIXELTYPE>

typedef PIXELTYPE& reference

the BasicImageView's reference type (i.e. the return type of image[diff] and image(dx,dy))

## ◆ const_reference

template<class PIXELTYPE>

typedef PIXELTYPE const& const_reference

the BasicImageView's const reference type (i.e. the return type of image[diff] and image(dx,dy) when image is const)

## ◆ pointer

template<class PIXELTYPE>

typedef PIXELTYPE* pointer

the BasicImageView's pointer type

## ◆ const_pointer

template<class PIXELTYPE>

typedef PIXELTYPE const* const_pointer

the BasicImageView's const pointer type

## ◆ iterator

template<class PIXELTYPE>

typedef PIXELTYPE* iterator

the BasicImageView's 1D random access iterator (note: lower case 'iterator' is a STL compatible 1D random access iterator, don't confuse with capitalized Iterator)

## ◆ ScanOrderIterator

template<class PIXELTYPE>

typedef PIXELTYPE* ScanOrderIterator

deprecated, use iterator instead

## ◆ const_iterator

template<class PIXELTYPE>

typedef PIXELTYPE const* const_iterator

the BasicImageView's 1D random access const iterator (note: lower case 'const_iterator' is a STL compatible 1D random access const iterator)

## ◆ ConstScanOrderIterator

template<class PIXELTYPE>

typedef PIXELTYPE const* ConstScanOrderIterator

deprecated, use const_iterator instead

## ◆ traverser

template<class PIXELTYPE>

typedef ImageIterator<value_type> traverser

the BasicImageView's 2D random access iterator ('traverser')

## ◆ Iterator

template<class PIXELTYPE>

typedef ImageIterator<value_type> Iterator

deprecated, use traverser instead

## ◆ const_traverser

template<class PIXELTYPE>

typedef ConstImageIterator<value_type> const_traverser

the BasicImageView's 2D random access const iterator ('const traverser')

## ◆ ConstIterator

template<class PIXELTYPE>

typedef ConstImageIterator<value_type> ConstIterator

deprecated, use const_traverser instead

## ◆ row_iterator

template<class PIXELTYPE>

typedef traverser::row_iterator row_iterator

the row iterator associated with the traverser

## ◆ const_row_iterator

template<class PIXELTYPE>

typedef const_traverser::row_iterator const_row_iterator

the const row iterator associated with the const_traverser

## ◆ column_iterator

template<class PIXELTYPE>

typedef traverser::column_iterator column_iterator

the column iterator associated with the traverser

## ◆ const_column_iterator

template<class PIXELTYPE>

typedef const_traverser::column_iterator const_column_iterator

the const column iterator associated with the const_traverser

## ◆ difference_type

template<class PIXELTYPE>

typedef Diff2D difference_type

the BasicImageView's difference type (argument type of image[diff])

## ◆ size_type

template<class PIXELTYPE>

typedef Size2D size_type

the BasicImageView's size type (result type of image.size())

## ◆ Accessor

template<class PIXELTYPE>

typedef IteratorTraits<traverser>::DefaultAccessor Accessor

the BasicImageView's default accessor

## ◆ ConstAccessor

template<class PIXELTYPE>

typedef IteratorTraits<const_traverser>::DefaultAccessor ConstAccessor

the BasicImageView's default const accessor

## Constructor & Destructor Documentation

## ◆ BasicImageView() [1/3]

template<class PIXELTYPE>

BasicImageView | ( |  | ) |

construct image of size 0x0

## ◆ BasicImageView() [2/3]

template<class PIXELTYPE>

BasicImageView | ( | const_pointer | data,
|  | std::ptrdiff_t | w,
|  | std::ptrdiff_t | h,
|  | std::ptrdiff_t | stride = 0 )

construct view of size w x h

## ◆ BasicImageView() [3/3]

template<class PIXELTYPE>

BasicImageView | ( | const_pointer | data,
|  | difference_type const & | size,
|  | std::ptrdiff_t | stride = 0 )

construct view of size size.x x size.y

## Member Function Documentation

## ◆ init()

template<class PIXELTYPE>

BasicImageView & init | ( | value_type const & | pixel | ) |

set Image with const value

## ◆ width()

template<class PIXELTYPE>

std::ptrdiff_t width | ( |  | ) | const

width of Image

## ◆ height()

template<class PIXELTYPE>

std::ptrdiff_t height | ( |  | ) | const

height of Image

## ◆ stride()

template<class PIXELTYPE>

std::ptrdiff_t stride | ( |  | ) | const

stride of Image. Memory offset between the start of two successive rows.

## ◆ size()

template<class PIXELTYPE>

size_type size | ( |  | ) | const

size of Image

## ◆ isInside()

template<class PIXELTYPE>

bool isInside | ( | difference_type const & | d | ) | const

test whether a given coordinate is inside the image

## ◆ operator[]() [1/4]

template<class PIXELTYPE>

reference operator[] | ( | difference_type const & | d | ) |

access pixel at given location.
usage: value_type value = image[Diff2D(1,2)]

## ◆ operator[]() [2/4]

template<class PIXELTYPE>

const_reference operator[] | ( | difference_type const & | d | ) | const

read pixel at given location.
usage: value_type value = image[Diff2D(1,2)]

## ◆ operator()() [1/2]

template<class PIXELTYPE>

reference operator() | ( | std::ptrdiff_t | dx,
|  | std::ptrdiff_t | dy )

access pixel at given location.
usage: value_type value = image(1,2)

## ◆ operator()() [2/2]

template<class PIXELTYPE>

const_reference operator() | ( | std::ptrdiff_t | dx,
|  | std::ptrdiff_t | dy ) const

read pixel at given location.
usage: value_type value = image(1,2)

## ◆ operator[]() [3/4]

template<class PIXELTYPE>

pointer operator[] | ( | std::ptrdiff_t | dy | ) |

access pixel at given location. Note that the 'x' index is the trailing index.
usage: value_type value = image[2][1]

## ◆ operator[]() [4/4]

template<class PIXELTYPE>

const_pointer operator[] | ( | std::ptrdiff_t | dy | ) | const

read pixel at given location. Note that the 'x' index is the trailing index.
usage: value_type value = image[2][1]

## ◆ upperLeft() [1/2]

template<class PIXELTYPE>

traverser upperLeft | ( |  | ) |

init 2D random access iterator pointing to upper left pixel

## ◆ lowerRight() [1/2]

template<class PIXELTYPE>

traverser lowerRight | ( |  | ) |

init 2D random access iterator pointing to pixel(width, height), i.e. one pixel right and below lower right corner of the image as is common in C/C++.

## ◆ upperLeft() [2/2]

template<class PIXELTYPE>

const_traverser upperLeft | ( |  | ) | const

init 2D random access const iterator pointing to upper left pixel

## ◆ lowerRight() [2/2]

template<class PIXELTYPE>

const_traverser lowerRight | ( |  | ) | const

init 2D random access const iterator pointing to pixel(width, height), i.e. one pixel right and below lower right corner of the image as is common in C/C++.

## ◆ begin() [1/2]

template<class PIXELTYPE>

iterator begin | ( |  | ) |

init 1D random access iterator pointing to first pixel. Note: Only works if stride equals width.

## ◆ end() [1/2]

template<class PIXELTYPE>

iterator end | ( |  | ) |

init 1D random access iterator pointing past the end. Note: Only works if stride equals width.

## ◆ begin() [2/2]

template<class PIXELTYPE>

const_iterator begin | ( |  | ) | const

init 1D random access const iterator pointing to first pixel. Note: Only works if stride equals width.

## ◆ end() [2/2]

template<class PIXELTYPE>

const_iterator end | ( |  | ) | const

init 1D random access const iterator pointing past the end. Note: Only works if stride equals width.

## ◆ rowBegin() [1/2]

template<class PIXELTYPE>

row_iterator rowBegin | ( | std::ptrdiff_t | y | ) |

init 1D random access iterator pointing to first pixel of row y

## ◆ rowEnd() [1/2]

template<class PIXELTYPE>

row_iterator rowEnd | ( | std::ptrdiff_t | y | ) |

init 1D random access iterator pointing past the end of row y

## ◆ rowBegin() [2/2]

template<class PIXELTYPE>

const_row_iterator rowBegin | ( | std::ptrdiff_t | y | ) | const

init 1D random access const iterator pointing to first pixel of row y

## ◆ rowEnd() [2/2]

template<class PIXELTYPE>

const_row_iterator rowEnd | ( | std::ptrdiff_t | y | ) | const

init 1D random access const iterator pointing past the end of row y

## ◆ columnBegin() [1/2]

template<class PIXELTYPE>

column_iterator columnBegin | ( | std::ptrdiff_t | x | ) |

init 1D random access iterator pointing to first pixel of column x

## ◆ columnEnd() [1/2]

template<class PIXELTYPE>

column_iterator columnEnd | ( | std::ptrdiff_t | x | ) |

init 1D random access iterator pointing past the end of column x

## ◆ columnBegin() [2/2]

template<class PIXELTYPE>

const_column_iterator columnBegin | ( | std::ptrdiff_t | x | ) | const

init 1D random access const iterator pointing to first pixel of column x

## ◆ columnEnd() [2/2]

template<class PIXELTYPE>

const_column_iterator columnEnd | ( | std::ptrdiff_t | x | ) | const

init 1D random access const iterator pointing past the end of column x

## ◆ data()

template<class PIXELTYPE>

const_pointer data | ( |  | ) | const

get a pointer to the internal data

## ◆ accessor() [1/2]

template<class PIXELTYPE>

Accessor accessor | ( |  | ) |

return default accessor

## ◆ accessor() [2/2]

template<class PIXELTYPE>

ConstAccessor accessor | ( |  | ) | const

return default const accessor

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

- vigra/basicimageview.hxx

© 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.12.4