STIRA  0.1
Public Member Functions | Static Public Member Functions | List of all members
stira::imagedata::ArrayGridTools< T > Class Template Reference

A class with operations to perform on a regular grid. More...

#include <ArrayGridTools.h>

Public Member Functions

 ArrayGridTools ()
 constructor
 
 ~ArrayGridTools ()
 destructor
 

Static Public Member Functions

static ArrayGrid< T > * DownSampleGrid (ArrayGrid< T > *pGridIn)
 downsamples this grid (no interpolation is performed) More...
 
static ArrayGrid< T > * UpSampleGrid (ArrayGrid< T > *pGridIn, int upSampledWidth, int upSampledHeight, double myFactor=4.0)
 Upsamples a band (no interpolation: newly inserted pixels are black) More...
 
static ArrayGrid< T > * CreateGridFromArray (T *pArray, int width, int height)
 Creates a grid object from an array. More...
 
static T * CreateArrayFromGrid (ArrayGrid< T > *pGridIn)
 Creates a array from grid object. More...
 
static ArrayGrid< T > * ExtractSubGrid (ArrayGrid< T > *pGridIn, int xTop, int yTop, int xBottom, int yBottom)
 Creates a subgrid from a grid. More...
 
static void InsertSubGrid (ArrayGrid< T > *pMasterGrid, ArrayGrid< T > *pSubGrid, int xTop, int yTop, int xBottom, int yBottom)
 Copies values from a subgrid in a larger grid. More...
 
static ArrayGrid< T > * CircularShiftGrid (ArrayGrid< T > *pGridIn, int deltaX, int deltaY)
 Creates copy of image which is circularly shifted.
 

Detailed Description

template<class T>
class stira::imagedata::ArrayGridTools< T >

A class with operations to perform on a regular grid.

Member Function Documentation

template<class T >
T * stira::imagedata::ArrayGridTools< T >::CreateArrayFromGrid ( ArrayGrid< T > *  pGridIn)
inlinestatic

Creates a array from grid object.

Parameters
pGridIngrid with source values

References stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), and stira::imagedata::ArrayGrid< T >::GetWidth().

template<class T >
ArrayGrid< T > * stira::imagedata::ArrayGridTools< T >::CreateGridFromArray ( T *  pArray,
int  width,
int  height 
)
inlinestatic

Creates a grid object from an array.

Parameters
pArrayarray with source values
widthwidth fo the source data
heightheight of the source data

References stira::imagedata::ArrayGrid< T >::SetValue().

template<class T >
ArrayGrid< T > * stira::imagedata::ArrayGridTools< T >::DownSampleGrid ( ArrayGrid< T > *  pGridIn)
inlinestatic

downsamples this grid (no interpolation is performed)

The reason that there is no interpolation before subsampling is that smoothing is already performed in most pyramid decomposition schemes. The caller gets a newly created grid, that becomes his responsible to delete

Parameters
pGridInthe input grid (is left untouched)

References stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), stira::imagedata::ArrayGrid< T >::GetWidth(), and stira::imagedata::ArrayGrid< T >::SetValue().

Referenced by stira::steerable::PyramidComplex::Decompose(), stira::steerable::PyramidReal::Decompose(), and stira::steerable::PyramidBurtAdelson::GetPyramid().

template<class T >
ArrayGrid< T > * stira::imagedata::ArrayGridTools< T >::ExtractSubGrid ( ArrayGrid< T > *  pGridIn,
int  xTop,
int  yTop,
int  xBottom,
int  yBottom 
)
inlinestatic

Creates a subgrid from a grid.

Parameters
pGridIngrid to extract subgrid from
xTopx coordinate of top left point in master grid to start extraction of subgrid (included in subgrid!)
yTopy coordinate of top left point in master grid to start extraction of subgrid (included in subgrid!)
xBottomx coordinate of bottom right point in master grid to stop extraction of subgrid (NOT included in subgrid!)
yBottomy coordinate of bottom right point in master grid to stop extraction of subgrid (NOT included in subgrid!)

References stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), stira::imagedata::ArrayGrid< T >::GetWidth(), and stira::imagedata::ArrayGrid< T >::SetValue().

Referenced by stira::wavelet::SubsampledTransform::Decompose().

template<class T >
void stira::imagedata::ArrayGridTools< T >::InsertSubGrid ( ArrayGrid< T > *  pMasterGrid,
ArrayGrid< T > *  pSubGrid,
int  xTop,
int  yTop,
int  xBottom,
int  yBottom 
)
inlinestatic

Copies values from a subgrid in a larger grid.

Parameters
pMasterGridgrid to write subgrid values to
pSubGridgrid to extract subgrid from
xTopx coordinate of top left point in master grid to start extraction of subgrid (included in subgrid!)
yTopy coordinate of top left point in master grid to start extraction of subgrid (included in subgrid!)
xBottomx coordinate of bottom right point in master grid to stop extraction of subgrid (NOT included in subgrid!)
yBottomy coordinate of bottom right point in master grid to stop extraction of subgrid (NOT included in subgrid!)

References stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), stira::imagedata::ArrayGrid< T >::GetWidth(), and stira::imagedata::ArrayGrid< T >::SetValue().

Referenced by stira::wavelet::SubsampledTransform::Decompose().

template<class T >
ArrayGrid< T > * stira::imagedata::ArrayGridTools< T >::UpSampleGrid ( ArrayGrid< T > *  pGridIn,
int  upSampledWidth,
int  upSampledHeight,
double  myFactor = 4.0 
)
inlinestatic

Upsamples a band (no interpolation: newly inserted pixels are black)

The reason that there is no interpolation before subsampling is that smoothing (or interpolation) is performed directly after this method in most pyramid decomposition schemes. The caller gets a newly created band, and is responsible for deleting it after usage. Because of the ambiguity (both width 2n-1 and 2n were downsampled to new width n), the upsampled width and height need to be specified.

This method creates and returns a new object, that is the responsability of the caller to delete

Parameters
pGridInthe input grid (is left untouched)
upSampledWidthwidth of destination upsampled image
upSampledHeightheight of destination upsampled image
myFactorfactor with which all values in the grid are multiplied

References stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), stira::imagedata::ArrayGrid< T >::GetWidth(), stira::imagedata::ArrayGrid< T >::SetGridValues(), and stira::imagedata::ArrayGrid< T >::SetValue().

Referenced by stira::steerable::PyramidBurtAdelson::Decompose(), stira::steerable::PyramidBurtAdelson::GetPyramid(), stira::steerable::PyramidComplex::Reconstruct(), and stira::steerable::PyramidReal::Reconstruct().


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