Simd Library Documentation.

Home | Release Notes | Download | Documentation | Forum | SourceForge | GitHub
Pyramid< A > Struct Template Reference

The Pyramid structure provides storage and manipulation of pyramid images. More...

Public Types

typedef A< uint8_t > Allocator
 

Public Member Functions

 Pyramid ()
 
 Pyramid (const Point< ptrdiff_t > &size, size_t levelCount)
 
 Pyramid (size_t width, size_t height, size_t levelCount)
 
void Recreate (Point< ptrdiff_t > size, size_t levelCount)
 
void Recreate (size_t width, size_t height, size_t levelCount)
 
size_t Size () const
 
View< A > & operator[] (size_t level)
 
const View< A > & operator[] (size_t level) const
 
View< A > & At (size_t level)
 
const View< A > & At (size_t level) const
 
View< A > & Top ()
 
const View< A > & Top () const
 
void Swap (Pyramid< A > &pyramid)
 

Detailed Description

template<template< class > class A>
struct Simd::Pyramid< A >

The Pyramid structure provides storage and manipulation of pyramid images.

The pyramid is a series of gray 8-bit images. Every image in the series is lesser in two times than previous. The structure is useful for image analysis.

Related Functions.

Member Typedef Documentation

typedef A<uint8_t> Allocator

Allocator type definition.

Constructor & Destructor Documentation

SIMD_INLINE Pyramid ( )

Creates a new empty Pyramid structure.

SIMD_INLINE Pyramid ( const Point< ptrdiff_t > &  size,
size_t  levelCount 
)

Creates a new Pyramid structure with specified size.

Parameters
[in]size- a size of pyramid's base (lowest and biggest image).
[in]levelCount- a number of pyramid levels.
SIMD_INLINE Pyramid ( size_t  width,
size_t  height,
size_t  levelCount 
)

Creates a new Pyramid structure with specified size.

Parameters
[in]width- a width of pyramid's base (lowest and biggest image).
[in]height- a height of pyramid's base (lowest and biggest image).
[in]levelCount- a number of pyramid levels.

Member Function Documentation

SIMD_INLINE void Recreate ( Point< ptrdiff_t >  size,
size_t  levelCount 
)

Re-create a Pyramid structure with specified size.

Parameters
[in]size- a size of pyramid's base (lowest and biggest image).
[in]levelCount- a number of pyramid levels.
SIMD_INLINE void Recreate ( size_t  width,
size_t  height,
size_t  levelCount 
)

Re-create a Pyramid structure with specified size.

Parameters
[in]width- a width of pyramid's base (lowest and biggest image).
[in]height- a height of pyramid's base (lowest and biggest image).
[in]levelCount- a number of pyramid levels.
SIMD_INLINE size_t Size ( ) const

Gets number of levels in the pyramid.

Returns
- number of levels in the pyramid.
SIMD_INLINE View< A > & operator[] ( size_t  level)

Gets an image at given level of the pyramid.

Parameters
[in]level- a level of the pyramid.
Returns
- a reference to the image at given level of the pyramid.
SIMD_INLINE const View< A > & operator[] ( size_t  level) const

Gets an image at given level of the pyramid.

Parameters
[in]level- a level of the pyramid.
Returns
- a constant reference to the image at given level of the pyramid.
SIMD_INLINE View< A > & At ( size_t  level)

Gets an image at given level of the pyramid.

Parameters
[in]level- a level of the pyramid.
Returns
- a reference to the image at given level of the pyramid.
SIMD_INLINE const View< A > & At ( size_t  level) const

Gets an image at on given level of the pyramid.

Parameters
[in]level- a level of the pyramid.
Returns
- a constant reference to the image at given level of the pyramid.
SIMD_INLINE View< A > & Top ( )

Gets an image at top level of the pyramid.

Returns
- a reference to the image at top level of the pyramid.
SIMD_INLINE const View< A > & Top ( ) const

Gets an image at top level of the pyramid.

Returns
- a constant reference to the image at top level of the pyramid.
SIMD_INLINE void Swap ( Pyramid< A > &  pyramid)

Swaps two pyramids.

Parameters
[in]pyramid- other pyramid.