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

Static Public Member Functions

static void RescaleGrid (ArrayGrid< T > *pGrid, T desiredMin, T desiredMax)
 
static void DiagnoseReal (ArrayGrid< double > *pGrid, std::string fileName)
 
static bool CountNANandINF (ArrayGrid< T > *pGrid, int &nrNAN, int &nrINF, std::string ID)
 
static bool CleanNANandINF (ArrayGrid< T > *pGrid)
 
static int CountZero (ArrayGrid< T > *pGrid)
 
static void GetMinMax (ArrayGrid< T > *pGrid, double &mmin, double &mmax)
 gets values of minimum and maximum of the grid More...
 
static void GetMinMax (ArrayGrid< T > *pGrid, double &mmin, double &mmax, int &xMin, int &yMin, int &xMax, int &yMax)
 gets values and positions of minimum and maximum of the grid More...
 
static void GetMin (ArrayGrid< T > *pGrid, double &mmin, int &xMin, int &yMin)
 gets value and position of minimum of the grid More...
 
static void GetMax (ArrayGrid< T > *pGrid, double &mmax, int &xMax, int &yMax)
 gets value and position of maximum of the grid More...
 
static double GetAbsMax (ArrayGrid< T > *pGrid)
 gets maximum in absolute value of the grid More...
 
static T GetGridIntegral (ArrayGrid< T > *pGrid)
 computes sum of all values in this grid More...
 
static double GetSquaredNorm (ArrayGrid< double > *pGrid)
 Gets the L2 norm of all values in the grid.
 
static double GetSquaredNorm (ArrayGrid< std::complex< double > > *pGrid)
 Gets the L2 norm of all values in the grid.
 
static T GetGridMean (ArrayGrid< T > *pGrid)
 computes mean of all values in this grid More...
 
static T GetGridVariance (ArrayGrid< T > *pGrid, T mean)
 computes variance of all values in this grid More...
 
static T GetGridKurtosis (ArrayGrid< T > *pGrid)
 computes kurtosis of all values in this grid More...
 
static T GetGridKurtosis (ArrayGrid< T > *pGrid, T gridMean, T gridvariance)
 computes kurtosis of all values in this grid Formula from http://en.wikipedia.org/wiki/Kurtosis#Sample_kurtosis section "Sample kurtosis" More...
 
static T GetLocalMinimum (ArrayGrid< T > *pGrid, int x, int y, int localWindowWidth, int localWindowHeight)
 gets local minimum in a local window with given size WARNING: does not perform boundary checking: moves from (x-(localWindowSize/2)) to (x+(localWindowSize/2)) and from (y-(localWindowSize/2)) to (y+(localWindowSize/2)) without checking if values go out of range!! More...
 
static T GetLocalMaximum (ArrayGrid< T > *pGrid, int x, int y, int localWindowWidth, int localWindowHeight)
 gets local maximum in a local window with given size WARNING: does not perform boundary checking: moves from (x-(localWindowSize/2)) to (x+(localWindowSize/2)) and from (y-(localWindowSize/2)) to (y+(localWindowSize/2)) without checking if values go out of range!! More...
 
static T GetLocalAbsMaximum (ArrayGrid< int > *pGrid, int x, int y, int localWindowWidth, int localWindowHeight)
 gets local maximum in absolute value in a local window with given size overloaded version for grid of integers WARNING: does not perform boundary checking: moves from (x-(localWindowSize/2)) to (x+(localWindowSize/2)) and from (y-(localWindowSize/2)) to (y+(localWindowSize/2)) without checking if values go out of range!! More...
 
static T GetLocalAbsMaximum (ArrayGrid< float > *pGrid, int x, int y, int localWindowWidth, int localWindowHeight)
 gets local maximum in absolute value in a local window with given size overloaded version for grid of floats WARNING: does not perform boundary checking: moves from (x-(localWindowSize/2)) to (x+(localWindowSize/2)) and from (y-(localWindowSize/2)) to (y+(localWindowSize/2)) without checking if values go out of range!! More...
 
static T GetLocalAbsMaximum (ArrayGrid< double > *pGrid, int x, int y, int localWindowWidth, int localWindowHeight)
 gets local maximum in absolute value in a local window with given size overloaded version for grid of doubles WARNING: does not perform boundary checking: moves from (x-(localWindowSize/2)) to (x+(localWindowSize/2)) and from (y-(localWindowSize/2)) to (y+(localWindowSize/2)) without checking if values go out of range!! More...
 
static T ComputeLocalMean (ArrayGrid< T > *pGrid, int &xTopLeft, int &yTopLeft, int &xBottomRight, int &yBottomRight)
 gets local mean of values in a local window defined by (xTopLeft, yTopLeft) as top left corner and (xBottomRight, yBottomRight) as bottom right corner (included!) More...
 
static double ComputeLocalMean (ArrayGrid< double > *pGrid, common::RectangularROI< int > rroi)
 gets local mean of values in a local window defined by a RectangularROI More...
 
static double ComputeLocalVariance (ArrayGrid< double > *pGrid, common::RectangularROI< int > rroi, double thisMean)
 gets local variance of values in a local window defined by a RectangularROI More...
 
static T ComputeLocalAbsoluteMean (ArrayGrid< T > *pGrid, int &xTopLeft, int &yTopLeft, int &xBottomRight, int &yBottomRight)
 gets local mean of ABSOLUTE values in a local window defined by (xTopLeft, yTopLeft) as top left corner and (xBottomRight, yBottomRight) as bottom right corner (included!) More...
 
static double ComputeLocalVariance (ArrayGrid< double > *pGrid, int &xTopLeft, int &yTopLeft, int &xBottomRight, int &yBottomRight, double thisMean)
 computes the variance of the values a local window size defined by (xTopLeft, yTopLeft) as top left corner and (xBottomRight, yBottomRight) as bottom right corner (included!) More...
 
static double ComputeLocalVariance (ArrayGrid< double > *pGrid, int &xTopLeft, int &yTopLeft, int &xBottomRight, int &yBottomRight)
 computes the variance of the values a local window size defined by (xTopLeft, yTopLeft) as top left corner and (xBottomRight, yBottomRight) as bottom right corner (included!) More...
 
static double ComputeLocalCovariance (ArrayGrid< double > *pGrid1, ArrayGrid< double > *pGrid2, int &xTopLeft, int &yTopLeft, int &xBottomRight, int &yBottomRight, double mean1, double mean2)
 computes the covariance between values in local windows of two given real-valued grids More...
 
static double ComputeLocalKurtosis (ArrayGrid< double > *pGrid, int &xTopLeft, int &yTopLeft, int &xBottomRight, int &yBottomRight, double localMean, double localVariance)
 computes the kurtosis of values in local window of given real-valued grid More...
 
static double ComputeLocalKurtosis (ArrayGrid< double > *pGrid, int &xTopLeft, int &yTopLeft, int &xBottomRight, int &yBottomRight)
 computes the kurtosis of values in local window of given real-valued grid More...
 

Member Function Documentation

template<class T >
T stira::imagedata::GridStatistics< T >::ComputeLocalAbsoluteMean ( ArrayGrid< T > *  pGrid,
int &  xTopLeft,
int &  yTopLeft,
int &  xBottomRight,
int &  yBottomRight 
)
static

gets local mean of ABSOLUTE values in a local window defined by (xTopLeft, yTopLeft) as top left corner and (xBottomRight, yBottomRight) as bottom right corner (included!)

does boundary checking: adjusts values of xTopLeft, xBottomRight, yTopLeft, yBottomRight to be clipped to fit inside the grid!!

Parameters
pGridgrid on which to compute
xTopLeftx coordinate of top left corner of local window
yTopLefty coordinate of top left corner of local window
xBottomRightx coordinate of bottom right corner of local window
yBottomRighty coordinate of bottom right corner of local window

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

Referenced by stira::imagedata::Pyramid< T >::GetAverageConeRatioRedundant(), and stira::imagedata::Pyramid< T >::GetAverageConeRatioSubSampled().

template<class T >
double stira::imagedata::GridStatistics< T >::ComputeLocalCovariance ( ArrayGrid< double > *  pGrid1,
ArrayGrid< double > *  pGrid2,
int &  xTopLeft,
int &  yTopLeft,
int &  xBottomRight,
int &  yBottomRight,
double  mean1,
double  mean2 
)
static

computes the covariance between values in local windows of two given real-valued grids

Parameters
pGrid1first source grid
pGrid2second source grid
xTopLeftx coordinate of left top corner of local window
yTopLefty coordinate of left top corner of local window
xBottomRightx coordinate of bottom right corner of local window
yBottomRighty coordinate of bottom right corner of local window
mean1mean value of pGrid1,
mean2mean value of pGrid2

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

Referenced by stira::imagetools::NumberGridTools< T >::ComputeSSIM(), and stira::imagetools::NumberGridTools< T >::ComputeSSIMinROI().

template<class T >
double stira::imagedata::GridStatistics< T >::ComputeLocalKurtosis ( ArrayGrid< double > *  pGrid,
int &  xTopLeft,
int &  yTopLeft,
int &  xBottomRight,
int &  yBottomRight,
double  localMean,
double  localVariance 
)
static

computes the kurtosis of values in local window of given real-valued grid

Parameters
pGridsource grid
xTopLeftx coordinate of left top corner of local window
yTopLefty coordinate of left top corner of local window
xBottomRightx coordinate of bottom right corner of local window
yBottomRighty coordinate of bottom right corner of local window
localMeanpre-computed mean value of values in local window of pGrid
localVariancepre-computed variance of values in local window of pGrid

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

template<class T >
double stira::imagedata::GridStatistics< T >::ComputeLocalKurtosis ( ArrayGrid< double > *  pGrid,
int &  xTopLeft,
int &  yTopLeft,
int &  xBottomRight,
int &  yBottomRight 
)
static

computes the kurtosis of values in local window of given real-valued grid

Parameters
pGridsource grid
xTopLeftx coordinate of left top corner of local window
yTopLefty coordinate of left top corner of local window
xBottomRightx coordinate of bottom right corner of local window
yBottomRighty coordinate of bottom right corner of local window

References stira::common::MathUtils::ClipValue(), stira::imagedata::GridStatistics< T >::ComputeLocalMean(), stira::imagedata::GridStatistics< T >::ComputeLocalVariance(), stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), and stira::imagedata::ArrayGrid< T >::GetWidth().

template<class T >
T stira::imagedata::GridStatistics< T >::ComputeLocalMean ( ArrayGrid< T > *  pGrid,
int &  xTopLeft,
int &  yTopLeft,
int &  xBottomRight,
int &  yBottomRight 
)
static

gets local mean of values in a local window defined by (xTopLeft, yTopLeft) as top left corner and (xBottomRight, yBottomRight) as bottom right corner (included!)

does boundary checking: adjusts values of xTopLeft, xBottomRight, yTopLeft, yBottomRight to be clipped to fit inside the grid!!

Parameters
pGridgrid on which to compute
xTopLeftx coordinate of top left corner of local window
yTopLefty coordinate of top left corner of local window
xBottomRightx coordinate of bottom right corner of local window
yBottomRighty coordinate of bottom right corner of local window

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

Referenced by stira::imagetools::NumberGridTools< T >::ComputeLocalCrossCorrelation(), stira::imagedata::GridStatistics< T >::ComputeLocalKurtosis(), stira::imagedata::GridStatistics< T >::ComputeLocalMean(), stira::imagetools::NumberGridTools< T >::ComputeSSIM(), stira::imagetools::NumberGridTools< T >::ComputeSSIMinROI(), stira::pyramidapplications::PyramidDenoiser::EstimateSigmaSignal(), and stira::filter::KuwaharaFilter::Run().

template<class T >
double stira::imagedata::GridStatistics< T >::ComputeLocalMean ( ArrayGrid< double > *  pGrid,
common::RectangularROI< int >  rroi 
)
static

gets local mean of values in a local window defined by a RectangularROI

does boundary checking: adjusts values of xTopLeft, xBottomRight, yTopLeft, yBottomRight to be clipped to fit inside the grid!!

Parameters
pGridgrid on which to compute
xTopLeftx coordinate of top left corner of local window
yTopLefty coordinate of top left corner of local window
xBottomRightx coordinate of bottom right corner of local window
yBottomRighty coordinate of bottom right corner of local window

References stira::imagedata::GridStatistics< T >::ComputeLocalMean(), stira::common::RectangularROI< T >::GetBottomRightCorner(), stira::common::RectangularROI< T >::GetTopLeftCorner(), stira::common::Point< T >::x, and stira::common::Point< T >::y.

template<class T >
double stira::imagedata::GridStatistics< T >::ComputeLocalVariance ( ArrayGrid< double > *  pGrid,
common::RectangularROI< int >  rroi,
double  thisMean 
)
static
template<class T >
double stira::imagedata::GridStatistics< T >::ComputeLocalVariance ( ArrayGrid< double > *  pGrid,
int &  xTopLeft,
int &  yTopLeft,
int &  xBottomRight,
int &  yBottomRight,
double  thisMean 
)
static

computes the variance of the values a local window size defined by (xTopLeft, yTopLeft) as top left corner and (xBottomRight, yBottomRight) as bottom right corner (included!)

does boundary checking: adjusts values of xTopLeft, xBottomRight, yTopLeft, yBottomRight to be clipped to fit inside the grid!!

WARNING: mean value of local window must already be computed before executing this method

Parameters
pGridsource grid
xTopLeftx coordinate of top left corner of local window
yTopLefty coordinate of top left corner of local window
xBottomRightx coordinate of bottom right corner of local window
yBottomRighty coordinate of bottom right corner of local window
thisMeanthe mean value of the values in the local window

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

template<class T >
double stira::imagedata::GridStatistics< T >::ComputeLocalVariance ( ArrayGrid< double > *  pGrid,
int &  xTopLeft,
int &  yTopLeft,
int &  xBottomRight,
int &  yBottomRight 
)
static

computes the variance of the values a local window size defined by (xTopLeft, yTopLeft) as top left corner and (xBottomRight, yBottomRight) as bottom right corner (included!)

does boundary checking: adjusts values of xTopLeft, xBottomRight, yTopLeft, yBottomRight to be clipped to fit inside the grid!!

Parameters
pGridsource grid
xTopLeftx coordinate of top left corner of local window
yTopLefty coordinate of top left corner of local window
xBottomRightx coordinate of bottom right corner of local window
yBottomRighty coordinate of bottom right corner of local window

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

template<class T >
double stira::imagedata::GridStatistics< T >::GetAbsMax ( ArrayGrid< T > *  pGrid)
static
template<class T >
T stira::imagedata::GridStatistics< T >::GetGridIntegral ( ArrayGrid< T > *  pGrid)
static
template<class T >
T stira::imagedata::GridStatistics< T >::GetGridKurtosis ( ArrayGrid< T > *  pGrid)
static

computes kurtosis of all values in this grid

Parameters
pGridin: grid to investigate Formula from http://en.wikipedia.org/wiki/Kurtosis#Sample_kurtosis section "Sample kurtosis"
meanmean of the grid; must already have been computed

References stira::imagedata::GridStatistics< T >::GetGridMean(), and stira::imagedata::GridStatistics< T >::GetGridVariance().

Referenced by stira::imagetools::ImageTools::Diagnose().

template<class T >
T stira::imagedata::GridStatistics< T >::GetGridKurtosis ( ArrayGrid< T > *  pGrid,
gridMean,
gridvariance 
)
static

computes kurtosis of all values in this grid Formula from http://en.wikipedia.org/wiki/Kurtosis#Sample_kurtosis section "Sample kurtosis"

Parameters
meanmean of the grid; must already have been computed

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

template<class T >
T stira::imagedata::GridStatistics< T >::GetGridMean ( ArrayGrid< T > *  pGrid)
static
template<class T >
T stira::imagedata::GridStatistics< T >::GetGridVariance ( ArrayGrid< T > *  pGrid,
mean 
)
static
template<class T >
T stira::imagedata::GridStatistics< T >::GetLocalAbsMaximum ( ArrayGrid< int > *  pGrid,
int  x,
int  y,
int  localWindowWidth,
int  localWindowHeight 
)
static

gets local maximum in absolute value in a local window with given size overloaded version for grid of integers WARNING: does not perform boundary checking: moves from (x-(localWindowSize/2)) to (x+(localWindowSize/2)) and from (y-(localWindowSize/2)) to (y+(localWindowSize/2)) without checking if values go out of range!!

Parameters
pGridgrid on which to compute
xx coordinate of central pixel of local window
yy coordinate of central pixel of local window
localWindowWidthwidth of local window
localWindowHeightheight of local window

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

template<class T >
T stira::imagedata::GridStatistics< T >::GetLocalAbsMaximum ( ArrayGrid< float > *  pGrid,
int  x,
int  y,
int  localWindowWidth,
int  localWindowHeight 
)
static

gets local maximum in absolute value in a local window with given size overloaded version for grid of floats WARNING: does not perform boundary checking: moves from (x-(localWindowSize/2)) to (x+(localWindowSize/2)) and from (y-(localWindowSize/2)) to (y+(localWindowSize/2)) without checking if values go out of range!!

Parameters
pGridgrid on which to compute
xx coordinate of central pixel of local window
yy coordinate of central pixel of local window
localWindowWidthwidth of local window
localWindowHeightheight of local window

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

template<class T >
T stira::imagedata::GridStatistics< T >::GetLocalAbsMaximum ( ArrayGrid< double > *  pGrid,
int  x,
int  y,
int  localWindowWidth,
int  localWindowHeight 
)
static

gets local maximum in absolute value in a local window with given size overloaded version for grid of doubles WARNING: does not perform boundary checking: moves from (x-(localWindowSize/2)) to (x+(localWindowSize/2)) and from (y-(localWindowSize/2)) to (y+(localWindowSize/2)) without checking if values go out of range!!

Parameters
pGridgrid on which to compute
xx coordinate of central pixel of local window
yy coordinate of central pixel of local window
localWindowWidthwidth of local window
localWindowHeightheight of local window

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

template<class T >
T stira::imagedata::GridStatistics< T >::GetLocalMaximum ( ArrayGrid< T > *  pGrid,
int  x,
int  y,
int  localWindowWidth,
int  localWindowHeight 
)
static

gets local maximum in a local window with given size WARNING: does not perform boundary checking: moves from (x-(localWindowSize/2)) to (x+(localWindowSize/2)) and from (y-(localWindowSize/2)) to (y+(localWindowSize/2)) without checking if values go out of range!!

Parameters
pGridgrid on which to compute
xx coordinate of central pixel of local window
yy coordinate of central pixel of local window
localWindowWidthwidth of local window
localWindowHeightheight of local window

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

Referenced by stira::contrastenhance::AdaptiveEnhanceLuong::SetWindowSize().

template<class T >
T stira::imagedata::GridStatistics< T >::GetLocalMinimum ( ArrayGrid< T > *  pGrid,
int  x,
int  y,
int  localWindowWidth,
int  localWindowHeight 
)
static

gets local minimum in a local window with given size WARNING: does not perform boundary checking: moves from (x-(localWindowSize/2)) to (x+(localWindowSize/2)) and from (y-(localWindowSize/2)) to (y+(localWindowSize/2)) without checking if values go out of range!!

Parameters
pGridgrid on which to compute
xx coordinate of central pixel of local window
yy coordinate of central pixel of local window
localWindowWidthwidth of local window
localWindowHeightheight of local window

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

Referenced by stira::imagetools::ImageTools::GetLocalDarkChannel(), and stira::contrastenhance::AdaptiveEnhanceLuong::SetWindowSize().

template<class T >
void stira::imagedata::GridStatistics< T >::GetMax ( ArrayGrid< T > *  pGrid,
double &  mmax,
int &  xMax,
int &  yMax 
)
static

gets value and position of maximum of the grid

Parameters
pGridin: grid to investigate
mmaxout: maximum value of the grid
xMaxout: x-coordinate of maximum value of the grid
yMaxout: y-coordinate of maximum value of the grid

References stira::imagedata::GridStatistics< T >::GetMinMax().

template<class T >
void stira::imagedata::GridStatistics< T >::GetMin ( ArrayGrid< T > *  pGrid,
double &  mmin,
int &  xMin,
int &  yMin 
)
static

gets value and position of minimum of the grid

Parameters
pGridin: grid to investigate
mminout: minimum value of the grid
xMinout: x-coordinate of minimum value of the grid
yMinout: y-coordinate of minimum value of the grid

References stira::imagedata::GridStatistics< T >::GetMinMax().

template<class T >
void stira::imagedata::GridStatistics< T >::GetMinMax ( ArrayGrid< T > *  pGrid,
double &  mmin,
double &  mmax 
)
static
template<class T >
void stira::imagedata::GridStatistics< T >::GetMinMax ( ArrayGrid< T > *  pGrid,
double &  mmin,
double &  mmax,
int &  xMin,
int &  yMin,
int &  xMax,
int &  yMax 
)
static

gets values and positions of minimum and maximum of the grid

Parameters
pGridin: grid to investigate
mminout: minimum value of the grid
mmaxout: maximum value of the grid
xMinout: x-coordinate of minimum value of the grid
yMinout: y-coordinate of minimum value of the grid
xMaxout: x-coordinate of maximum value of the grid
yMaxout: y-coordinate of maximum value of the grid

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


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