STIRA
0.1
|
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. | |
A class with operations to perform on a regular grid.
|
inlinestatic |
Creates a array from grid object.
pGridIn | grid with source values |
References stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), and stira::imagedata::ArrayGrid< T >::GetWidth().
|
inlinestatic |
Creates a grid object from an array.
pArray | array with source values |
width | width fo the source data |
height | height of the source data |
References stira::imagedata::ArrayGrid< T >::SetValue().
|
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
pGridIn | the 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().
|
inlinestatic |
Creates a subgrid from a grid.
pGridIn | grid to extract subgrid from |
xTop | x coordinate of top left point in master grid to start extraction of subgrid (included in subgrid!) |
yTop | y coordinate of top left point in master grid to start extraction of subgrid (included in subgrid!) |
xBottom | x coordinate of bottom right point in master grid to stop extraction of subgrid (NOT included in subgrid!) |
yBottom | y 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().
|
inlinestatic |
Copies values from a subgrid in a larger grid.
pMasterGrid | grid to write subgrid values to |
pSubGrid | grid to extract subgrid from |
xTop | x coordinate of top left point in master grid to start extraction of subgrid (included in subgrid!) |
yTop | y coordinate of top left point in master grid to start extraction of subgrid (included in subgrid!) |
xBottom | x coordinate of bottom right point in master grid to stop extraction of subgrid (NOT included in subgrid!) |
yBottom | y 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().
|
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
pGridIn | the input grid (is left untouched) |
upSampledWidth | width of destination upsampled image |
upSampledHeight | height of destination upsampled image |
myFactor | factor 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().