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

Child class of ArrayGrid in specific case that the template represents numerical values In this case, certain extra operations are possible, like finding min and max, add, multiply, subtract Methods in this class are divided in the following "sections": 0. CONSTRUCT / DESTRUCT. More...

#include <NumberGridTools.h>

Public Member Functions

 NumberGridTools ()
 Constructor.
 
virtual ~NumberGridTools ()
 Destructor.
 

Static Public Member Functions

static void CopyValues (ArrayGrid< T > *pSourceGrid, ArrayGrid< T > *pDestinationGrid)
 copies values from pSourceGrid to pDestinationGrid More...
 
static std::vector< common::IntensityPointProjectGridOnX (ArrayGrid< T > *pGrid)
 projects the values in the grid on the X axis More...
 
static std::vector< common::IntensityPointProjectGridOnX (ArrayGrid< T > *pGrid, int xTopLeft, int yTopLeft, int xBottomRight, int yBottomRight)
 projects the values in the grid on the Y axis More...
 
static std::vector< common::IntensityPointProjectGridOnY (ArrayGrid< T > *pGrid)
 projects the values in the grid on the X axis More...
 
static std::vector< common::IntensityPointProjectGridOnY (ArrayGrid< T > *pGrid, int xTopLeft, int yTopLeft, int xBottomRight, int yBottomRight)
 projects the values in the grid on the Y axis More...
 
static ArrayGrid< double > * ComputeLocalAutoCorrelation (ArrayGrid< double > *pGridIn, int xCenter, int yCenter, int halfWindowSize)
 Computes local AutoCorrelation in a pixel neighborhood. More...
 
static double ComputeLocalSquaredDifference (ArrayGrid< double > *pGrid1, int xTop1, int yTop1, int xBottom1, int yBottom1, ArrayGrid< double > *pGrid2, int xTop2, int yTop2, int xBottom2, int yBottom2)
 computes sum of square differences between two ROIs in two different grids More...
 
static double ComputeLocalCrossCorrelation (ArrayGrid< double > *pGrid1, int xTop1, int yTop1, int xBottom1, int yBottom1, ArrayGrid< double > *pGrid2, int xTop2, int yTop2, int xBottom2, int yBottom2)
 computes local normalized cross-correlation between two ROIs in two different grids More...
 
static double ComputeLocalMutualInformation (ArrayGrid< double > *pGrid1, int xTop1, int yTop1, int xBottom1, int yBottom1, ArrayGrid< double > *pGrid2, int xTop2, int yTop2, int xBottom2, int yBottom2)
 computes mutual information between two ROIs in two different grids Reference: http://www.mathworks.com/matlabcentral/fileexchange/36538-very-fast-mutual-information-betweentwo-images More...
 
static ArrayGrid< double > * CreateSquaredErrorGrid (ArrayGrid< double > *pGrid1, ArrayGrid< double > *pGrid2, bool printOutput=false)
 computes grid with squared error values between two grids More...
 
static double ComputeMSE (ArrayGrid< double > *pGrid1, ArrayGrid< double > *pGrid2)
 computes MSE (Mean Squared Error) between two grids More...
 
static double ComputeMSEinROI (ArrayGrid< double > *pGrid1, ArrayGrid< double > *pGrid2, int topLeftX, int topLeftY, int bottomRightX, int bottomRightY)
 computes MSE (Mean Squared Error) between two grids in a given Region of Interest (ROI) More...
 
static double ComputePSNR (ArrayGrid< double > *pGrid1, ArrayGrid< double > *pGrid2)
 computes PSNR (Peak Signal to Noise Ratio) between two grids More...
 
static double ComputePSNRinROI (ArrayGrid< double > *pGrid1, ArrayGrid< double > *pGrid2, int topLeftX, int topLeftY, int bottomRightX, int bottomRightY)
 computes PSNR (Peak Signal to Noise Ratio) between two grids in a given Region of Interest (ROI) More...
 
static ArrayGrid< double > * ComputeSSIM (ArrayGrid< double > *pGrid1, ArrayGrid< double > *pGrid2, int localWindowSize, double intensityRange=255.0)
 compares the two grids using SSIM SSIM stands for Structural SIMilarity measure, see http://en.wikipedia.org/wiki/SSIM First published in Z. Wang, A. C. Bovik, H. R. Sheikh and E. P. Simoncelli, "Image quality assessment: From error visibility to structural similarity," IEEE Trans. on Image Processing, vol. 13, no. 4, pp. 600-612, Apr. 2004. More...
 
static ArrayGrid< double > * ComputeSSIMinROI (ArrayGrid< double > *pGrid1, ArrayGrid< double > *pGrid2, int topLeftX, int topLeftY, int bottomRightX, int bottomRightY, int localWindowSize, double intensityRange=255.0)
 compares the two grids using SSIM in a given Region of Interest (ROI) SSIM stands for Structural SIMilarity measure, see http://en.wikipedia.org/wiki/SSIM First published in Z. Wang, A. C. Bovik, H. R. Sheikh and E. P. Simoncelli, "Image quality assessment: From error visibility to structural similarity," IEEE Trans. on Image Processing, vol. 13, no. 4, pp. 600-612, Apr. 2004. More...
 
static ArrayGrid< double > * ComputePearsonCorrelation (ArrayGrid< double > *pGrid1, ArrayGrid< double > *pGrid2)
 standard correlation/colocalization method Ref.: http://support.svi.nl/wiki/ColocalizationTheory More...
 
static ArrayGrid< double > * ComputeMandersOverlap (ArrayGrid< double > *pGrid1, ArrayGrid< double > *pGrid2)
 standard correlation/colocalization method Ref.: http://support.svi.nl/wiki/ColocalizationTheory http://www.mediacy.com/pdfs/colocfluorprobes.pdf More...
 
static ArrayGrid< int > * CreateIntGrid (ArrayGrid< T > *pGrid)
 creates a grid where all values of the source grid were casted to integers More...
 
static ArrayGrid< double > * CreateDoubleGrid (ArrayGrid< T > *pGrid)
 creates a grid where all values of the source grid were casted to doubles More...
 
static ArrayGrid< double > * CreateDoubleGridFromComplexGrid (ArrayGrid< std::complex< double > > *pGrid)
 creates a grid with the norm of the complex values of the source grid More...
 
static ArrayGrid< double > * NegateGrid (ArrayGrid< double > *pGrid)
 creates a grid with as value the negative, i.e., maxvalue - current value at source grid More...
 
static void NegateGridSelf (ArrayGrid< double > *pGrid, double maxValue)
 
static ArrayGrid< int > * NegateGrid (ArrayGrid< int > *pGrid, int maxValue)
 creates a grid with as value the negative, i.e., maxvalue - current value at source grid More...
 
static void NegateGridSelf (ArrayGrid< int > *pGrid, int maxValue)
 
static T GetFirstDerivativeX (ArrayGrid< T > *pGrid, int x, int y)
 Gets value of first derivative in x-direction for given position Computes first derivative in x = I(x+1,y) - I(x-1,y) Does NOT perform boundary checking; be sure you check ranges of x and y yourself. More...
 
static T GetFirstDerivativeY (ArrayGrid< T > *pGrid, int x, int y)
 Gets value of first derivative in x-direction for given position Computes first derivative in y = I(x,y+1) - I(x,y-1) Does NOT perform boundary checking; be sure you check ranges of x and y yourself. More...
 
static T GetSecondDerivativeXX (ArrayGrid< T > *pGrid, int x, int y)
 Gets value of second derivative in x-direction for given position Computes second derivative in x = - I(x-2,y) + 2 I(x,y) - I(x+2,y) Does NOT perform boundary checking; be sure you check ranges of x and y yourself. More...
 
static T GetSecondDerivativeXY (ArrayGrid< T > *pGrid, int x, int y)
 Gets value of mixed derivative in x and y for given position Computes mixed derivative in x and y = ( I( x+1, y+1 ) - I( x-1, y+1 ) ) More...
 
static T GetSecondDerivativeYY (ArrayGrid< T > *pGrid, int x, int y)
 Gets value of second derivative in y-direction for given position Computes second derivative in y = - I(x,y-2) + 2 I(x,y) - I(x,y+2 ) Does NOT perform boundary checking; be sure you check ranges of x and y yourself. More...
 
static ArrayGrid< double > * Rotate90DegreesClockwise (ArrayGrid< double > *pGrid)
 Rotates the input grid 90 degrees clockwise. More...
 
static ArrayGrid< double > * Rotate90DegreesCounterClockwise (ArrayGrid< double > *pGrid)
 Rotates the input grid 90 degrees counter-clockwise. More...
 
static ArrayGrid< double > * Rotate180Degrees (ArrayGrid< double > *pGrid)
 Rotates the input grid 180 degrees. More...
 
static ArrayGrid< double > * LogPolarTransform (ArrayGrid< double > *pGrid)
 Transforms grid using the log-polar transform Reference: ROBUST IMAGE REGISTRATION USING LOG-POLAR TRANSFORM George Wolberg http://www.cis.rit.edu/~cnspci/references/wolberg2000.pdf http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/YOUNG2/. More...
 
static void ClipValues (ArrayGrid< T > *pGrid, T desiredMin, T desiredMax)
 Clips all values in the grid between a desired minimum and maximum value. More...
 
static ArrayGrid< double > * HardThreshold (ArrayGrid< double > *pGrid, double threshold)
 Sets values with absolute values smaller than threshold to 0; keeps other values. More...
 
static ArrayGrid< bool > * BinaryThreshold (ArrayGrid< double > *pGrid, double threshold, bool thresholdAbsoluteValue=false)
 Sets values with absolute values smaller than threshold to false and others to true. More...
 
static ArrayGrid< int > * BinaryThresholdInteger (ArrayGrid< double > *pGrid, int threshold)
 Sets values with absolute values smaller than threshold to false and others to true. More...
 
static void UpdateAverageGrid (ArrayGrid< T > *pAverageGrid, ArrayGrid< T > *pNewGrid, int previousNrOfGridsProcessed)
 
static ArrayGrid< T > * AverageGrids (std::vector< ArrayGrid< T > * > gridVector)
 Averages a vector of grids. More...
 

Detailed Description

template<class T>
class stira::imagetools::NumberGridTools< T >

Child class of ArrayGrid in specific case that the template represents numerical values In this case, certain extra operations are possible, like finding min and max, add, multiply, subtract Methods in this class are divided in the following "sections": 0. CONSTRUCT / DESTRUCT.

  1. GLOBAL DIAGNOSTICS
  2. GLOBAL GRID STATISTICS AND PROJECTIONS
  3. LOCAL WINDOW GRID STATISTICS
  4. COMPARISON GRIDS / COEFFICIENTS
  5. CONVERT GRID DATA TYPE
  6. GRID DERIVATIVES
  7. GRID ROTATION WITHOUT RESAMPLING
  8. SPECIAL TRANSFORMS
  9. GRID THRESHOLDING

COMBINE GRIDS

Member Function Documentation

template<class T >
ArrayGrid< T > * stira::imagetools::NumberGridTools< T >::AverageGrids ( std::vector< ArrayGrid< T > * >  gridVector)
static

Averages a vector of grids.

Parameters
gridVectorthe set of grids to average

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

template<class T >
ArrayGrid< bool > * stira::imagetools::NumberGridTools< T >::BinaryThreshold ( ArrayGrid< double > *  pGrid,
double  threshold,
bool  thresholdAbsoluteValue = false 
)
static

Sets values with absolute values smaller than threshold to false and others to true.

Parameters
pGridinput grid to be thresholded
thresholdvalue of the hard threshold
thresholdAbsoluteValueif true, we apply the threshold on the absolute value; if false, we apply the threshold directly on the value Generates new grid with output that caller should delete

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

template<class T >
ArrayGrid< int > * stira::imagetools::NumberGridTools< T >::BinaryThresholdInteger ( ArrayGrid< double > *  pGrid,
int  threshold 
)
static

Sets values with absolute values smaller than threshold to false and others to true.

Parameters
pGridinput grid to be thresholded
thresholdvalue of the hard threshold
thresholdAbsoluteValueif true, we apply the threshold on the absolute value; if false, we apply the threshold directly on the value Generates new grid with output that caller should delete

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

template<class T >
void stira::imagetools::NumberGridTools< T >::ClipValues ( ArrayGrid< T > *  pGrid,
desiredMin,
desiredMax 
)
static

Clips all values in the grid between a desired minimum and maximum value.

Parameters
pGridinput grid; values are overwritten
desiredMindesired minimum after clipping
desiredMaxdesired maximum after clipping

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

template<class T >
ArrayGrid< double > * stira::imagetools::NumberGridTools< T >::ComputeLocalAutoCorrelation ( ArrayGrid< double > *  pGridIn,
int  xCenter,
int  yCenter,
int  halfWindowSize 
)
static

Computes local AutoCorrelation in a pixel neighborhood.

Parameters
pGridIninput grid
xCenterx coordinate of center of neighborhood
yCentery coordinate of center of neighborhood
halfWindowSizehalf of size of window (for 5x5 window, halfWindowSize is 2)
Returns
small grid with local autocorrelation

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

template<class T >
double stira::imagetools::NumberGridTools< T >::ComputeLocalCrossCorrelation ( ArrayGrid< double > *  pGrid1,
int  xTop1,
int  yTop1,
int  xBottom1,
int  yBottom1,
ArrayGrid< double > *  pGrid2,
int  xTop2,
int  yTop2,
int  xBottom2,
int  yBottom2 
)
static

computes local normalized cross-correlation between two ROIs in two different grids

Parameters
pGrid1first input grid
xTop1x coordinate of left top corner of ROI in first grid
yTop1x coordinate of left top corner of ROI in first grid
xBottom1x coordinate of right bottom corner of ROI in first grid
yBottom1y coordinate of right bottom corner of ROI in first grid
pGrid2second input grid
xTop2x coordinate of left top corner of ROI in second grid
yTop2y coordinate of left top corner of ROI in second grid
xBottom2x coordinate of right bottom corner of ROI in second grid
yBottom2y coordinate of right bottom corner of ROI in second grid

References stira::imagedata::GridStatistics< T >::ComputeLocalMean(), and stira::imagedata::ArrayGrid< T >::GetValue().

template<class T >
double stira::imagetools::NumberGridTools< T >::ComputeLocalMutualInformation ( ArrayGrid< double > *  pGrid1,
int  xTop1,
int  yTop1,
int  xBottom1,
int  yBottom1,
ArrayGrid< double > *  pGrid2,
int  xTop2,
int  yTop2,
int  xBottom2,
int  yBottom2 
)
static

computes mutual information between two ROIs in two different grids Reference: http://www.mathworks.com/matlabcentral/fileexchange/36538-very-fast-mutual-information-betweentwo-images

Parameters
pGrid1first input grid
xTop1x coordinate of left top corner of ROI in first grid
yTop1x coordinate of left top corner of ROI in first grid
xBottom1x coordinate of right bottom corner of ROI in first grid
yBottom1y coordinate of right bottom corner of ROI in first grid
pGrid2second input grid
xTop2x coordinate of left top corner of ROI in second grid
yTop2y coordinate of left top corner of ROI in second grid
xBottom2x coordinate of right bottom corner of ROI in second grid
yBottom2y coordinate of right bottom corner of ROI in second grid

References stira::histogram::HistogramMaster< T >::GetBinValue(), stira::histogram::HistogramMaster< T >::GetNrOfBins(), stira::histogram::JointHistogram::GetNrOfHorizontalBins(), and stira::histogram::JointHistogram::GetNrOfVerticalBins().

template<class T >
double stira::imagetools::NumberGridTools< T >::ComputeLocalSquaredDifference ( ArrayGrid< double > *  pGrid1,
int  xTop1,
int  yTop1,
int  xBottom1,
int  yBottom1,
ArrayGrid< double > *  pGrid2,
int  xTop2,
int  yTop2,
int  xBottom2,
int  yBottom2 
)
static

computes sum of square differences between two ROIs in two different grids

Parameters
pGrid1first input grid
xTop1x coordinate of left top corner of ROI in first grid
yTop1x coordinate of left top corner of ROI in first grid
xBottom1x coordinate of right bottom corner of ROI in first grid
yBottom1y coordinate of right bottom corner of ROI in first grid
pGrid2second input grid
xTop1x coordinate of left top corner of ROI in first grid
xTop2x coordinate of left top corner of ROI in second grid
yTop2y coordinate of left top corner of ROI in second grid
xBottom2x coordinate of right bottom corner of ROI in second grid
yBottom2y coordinate of right bottom corner of ROI in second grid

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

template<class T >
ArrayGrid< double > * stira::imagetools::NumberGridTools< T >::ComputeMandersOverlap ( ArrayGrid< double > *  pGrid1,
ArrayGrid< double > *  pGrid2 
)
static
template<class T >
double stira::imagetools::NumberGridTools< T >::ComputeMSE ( ArrayGrid< double > *  pGrid1,
ArrayGrid< double > *  pGrid2 
)
static

computes MSE (Mean Squared Error) between two grids

Parameters
pGrid1First grid to compare
pGrid2Second grid to compare

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

Referenced by stira::imagetools::ImageTools::ComputeMSE(), and stira::deconvolve::GNCDeconvolve::Run().

template<class T >
double stira::imagetools::NumberGridTools< T >::ComputeMSEinROI ( ArrayGrid< double > *  pGrid1,
ArrayGrid< double > *  pGrid2,
int  topLeftX,
int  topLeftY,
int  bottomRightX,
int  bottomRightY 
)
static

computes MSE (Mean Squared Error) between two grids in a given Region of Interest (ROI)

Parameters
pGrid1First grid to compare
pGrid2Second grid to compare
topLeftXx coordinate of the top left corner of the ROI
topLeftYy coordinate of the top left corner of the ROI
bottomRightXx coordinate of the bottom right corner of the ROI
bottomRightYy coordinate of the bottom right corner of the ROI

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

template<class T >
ArrayGrid< double > * stira::imagetools::NumberGridTools< T >::ComputePearsonCorrelation ( ArrayGrid< double > *  pGrid1,
ArrayGrid< double > *  pGrid2 
)
static
template<class T >
double stira::imagetools::NumberGridTools< T >::ComputePSNR ( ArrayGrid< double > *  pGrid1,
ArrayGrid< double > *  pGrid2 
)
static

computes PSNR (Peak Signal to Noise Ratio) between two grids

Parameters
pGrid1First grid to compare
pGrid2Second grid to compare

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

template<class T >
double stira::imagetools::NumberGridTools< T >::ComputePSNRinROI ( ArrayGrid< double > *  pGrid1,
ArrayGrid< double > *  pGrid2,
int  topLeftX,
int  topLeftY,
int  bottomRightX,
int  bottomRightY 
)
static

computes PSNR (Peak Signal to Noise Ratio) between two grids in a given Region of Interest (ROI)

Parameters
pGrid1First grid to compare
pGrid2Second grid to compare
topLeftXx coordinate of the top left corner of the ROI
topLeftYy coordinate of the top left corner of the ROI
bottomRightXx coordinate of the bottom right corner of the ROI
bottomRightYy coordinate of the bottom right corner of the ROI

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

template<class T >
ArrayGrid< double > * stira::imagetools::NumberGridTools< T >::ComputeSSIM ( ArrayGrid< double > *  pGrid1,
ArrayGrid< double > *  pGrid2,
int  localWindowSize,
double  intensityRange = 255.0 
)
static

compares the two grids using SSIM SSIM stands for Structural SIMilarity measure, see http://en.wikipedia.org/wiki/SSIM First published in Z. Wang, A. C. Bovik, H. R. Sheikh and E. P. Simoncelli, "Image quality assessment: From error visibility to structural similarity," IEEE Trans. on Image Processing, vol. 13, no. 4, pp. 600-612, Apr. 2004.

In order to evaluate the image quality this formula is applied only on the luminance. Resultant SSIM index is a decimal value between -1 and 1

Parameters
pGrid1first grid to compare
pGrid2second grid to compare
localWindowSizesize of local window to compute local image statistics used in SSIM
intensityRangerange of the intensities present in the grids to compare

References stira::imagedata::GridStatistics< T >::ComputeLocalCovariance(), stira::imagedata::GridStatistics< T >::ComputeLocalMean(), stira::imagedata::GridStatistics< T >::ComputeLocalVariance(), stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetWidth(), and stira::imagedata::ArrayGrid< T >::SetValue().

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

template<class T >
ArrayGrid< double > * stira::imagetools::NumberGridTools< T >::ComputeSSIMinROI ( ArrayGrid< double > *  pGrid1,
ArrayGrid< double > *  pGrid2,
int  topLeftX,
int  topLeftY,
int  bottomRightX,
int  bottomRightY,
int  localWindowSize,
double  intensityRange = 255.0 
)
static

compares the two grids using SSIM in a given Region of Interest (ROI) SSIM stands for Structural SIMilarity measure, see http://en.wikipedia.org/wiki/SSIM First published in Z. Wang, A. C. Bovik, H. R. Sheikh and E. P. Simoncelli, "Image quality assessment: From error visibility to structural similarity," IEEE Trans. on Image Processing, vol. 13, no. 4, pp. 600-612, Apr. 2004.

In order to evaluate the image quality this formula is applied only on the luminance. Resulting SSIM index is a decimal value between -1 and 1

Parameters
pGrid1first grid to compare
pGrid2second grid to compare
topLeftXx coordinate of the top left corner of the ROI
topLeftYy coordinate of the top left corner of the ROI
bottomRightXx coordinate of the bottom right corner of the ROI
bottomRightYy coordinate of the bottom right corner of the ROI
localWindowSizesize of local window to compute local image statistics used in SSIM
intensityRangerange of the intensities present in the grids to compare

References stira::imagedata::GridStatistics< T >::ComputeLocalCovariance(), stira::imagedata::GridStatistics< T >::ComputeLocalMean(), stira::imagedata::GridStatistics< T >::ComputeLocalVariance(), stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetWidth(), and stira::imagedata::ArrayGrid< T >::SetValue().

template<class T >
void stira::imagetools::NumberGridTools< T >::CopyValues ( ArrayGrid< T > *  pSourceGrid,
ArrayGrid< T > *  pDestinationGrid 
)
static

copies values from pSourceGrid to pDestinationGrid

Parameters
pSourceGridgrid from which to copy values
pDestinationGridgrid to which to copy values

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

Referenced by stira::deconvolve::GNCDeconvolve::Run().

template<class T >
ArrayGrid< double > * stira::imagetools::NumberGridTools< T >::CreateDoubleGrid ( ArrayGrid< T > *  pGrid)
static
template<class T >
ArrayGrid< double > * stira::imagetools::NumberGridTools< T >::CreateDoubleGridFromComplexGrid ( ArrayGrid< std::complex< double > > *  pGrid)
static

creates a grid with the norm of the complex values of the source grid

Parameters
pGridthe complex-valued source grid

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::Diagnose().

template<class T >
ArrayGrid< int > * stira::imagetools::NumberGridTools< T >::CreateIntGrid ( ArrayGrid< T > *  pGrid)
static

creates a grid where all values of the source grid were casted to integers

Parameters
pGridthe source grid

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

template<class T >
ArrayGrid< double > * stira::imagetools::NumberGridTools< T >::CreateSquaredErrorGrid ( ArrayGrid< double > *  pGrid1,
ArrayGrid< double > *  pGrid2,
bool  printOutput = false 
)
static

computes grid with squared error values between two grids

Parameters
pGrid1First grid to compare
pGrid2Second grid to compare
printOutputflag if output needs to be printed to console Also writes max squared error, mean squared error and PSNR on standard output if "printOutput==true"

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

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

template<class T >
T stira::imagetools::NumberGridTools< T >::GetFirstDerivativeX ( ArrayGrid< T > *  pGrid,
int  x,
int  y 
)
inlinestatic

Gets value of first derivative in x-direction for given position Computes first derivative in x = I(x+1,y) - I(x-1,y) Does NOT perform boundary checking; be sure you check ranges of x and y yourself.

Parameters
pGridsource grid
xx coordinate of where to get value of first derivative
yy coordinate of where to get value of first derivative

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

template<class T >
T stira::imagetools::NumberGridTools< T >::GetFirstDerivativeY ( ArrayGrid< T > *  pGrid,
int  x,
int  y 
)
inlinestatic

Gets value of first derivative in x-direction for given position Computes first derivative in y = I(x,y+1) - I(x,y-1) Does NOT perform boundary checking; be sure you check ranges of x and y yourself.

Parameters
pGridsource grid
xx coordinate of where to get value of first derivative
yy coordinate of where to get value of first derivative

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

template<class T >
T stira::imagetools::NumberGridTools< T >::GetSecondDerivativeXX ( ArrayGrid< T > *  pGrid,
int  x,
int  y 
)
inlinestatic

Gets value of second derivative in x-direction for given position Computes second derivative in x = - I(x-2,y) + 2 I(x,y) - I(x+2,y) Does NOT perform boundary checking; be sure you check ranges of x and y yourself.

Parameters
pGridsource grid
xx coordinate of where to get value of second derivative
yy coordinate of where to get value of second derivative

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

Referenced by stira::deconvolve::RichardsonLucyDeconvolve::Run().

template<class T >
T stira::imagetools::NumberGridTools< T >::GetSecondDerivativeXY ( ArrayGrid< T > *  pGrid,
int  x,
int  y 
)
inlinestatic

Gets value of mixed derivative in x and y for given position Computes mixed derivative in x and y = ( I( x+1, y+1 ) - I( x-1, y+1 ) )

  • ( I( x+1, y-1 ) - I( x-1, y-1 ) ) Does NOT perform boundary checking; be sure you check ranges of x and y yourself
    Parameters
    pGridsource grid
    xx coordinate of where to get value of mixed derivative
    yy coordinate of where to get value of mixed derivative

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

template<class T >
T stira::imagetools::NumberGridTools< T >::GetSecondDerivativeYY ( ArrayGrid< T > *  pGrid,
int  x,
int  y 
)
inlinestatic

Gets value of second derivative in y-direction for given position Computes second derivative in y = - I(x,y-2) + 2 I(x,y) - I(x,y+2 ) Does NOT perform boundary checking; be sure you check ranges of x and y yourself.

Parameters
pGridsource grid
xx coordinate of where to get value of second derivative
yy coordinate of where to get value of second derivative

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

Referenced by stira::deconvolve::RichardsonLucyDeconvolve::Run().

template<class T >
ArrayGrid< double > * stira::imagetools::NumberGridTools< T >::HardThreshold ( ArrayGrid< double > *  pGrid,
double  threshold 
)
static

Sets values with absolute values smaller than threshold to 0; keeps other values.

Parameters
pGridinput grid to be thresholded
thresholdvalue of the hard threshold Generates new grid with output that caller should delete

References stira::imagedata::ArrayGrid< T >::Clone(), 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< double > * stira::imagetools::NumberGridTools< T >::LogPolarTransform ( ArrayGrid< double > *  pGrid)
static
template<class T >
ArrayGrid< double > * stira::imagetools::NumberGridTools< T >::NegateGrid ( ArrayGrid< double > *  pGrid)
static

creates a grid with as value the negative, i.e., maxvalue - current value at source grid

Parameters
pGridthe grid to take negative of

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

template<class T >
ArrayGrid< int > * stira::imagetools::NumberGridTools< T >::NegateGrid ( ArrayGrid< int > *  pGrid,
int  maxValue 
)
static

creates a grid with as value the negative, i.e., maxvalue - current value at source grid

Parameters
pGridthe grid to take negative of

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

template<class T >
std::vector< common::IntensityPoint > stira::imagetools::NumberGridTools< T >::ProjectGridOnX ( ArrayGrid< T > *  pGrid)
static

projects the values in the grid on the X axis

Parameters
pGridinput grid to project

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

template<class T>
static std::vector< common::IntensityPoint > stira::imagetools::NumberGridTools< T >::ProjectGridOnX ( ArrayGrid< T > *  pGrid,
int  xTopLeft,
int  yTopLeft,
int  xBottomRight,
int  yBottomRight 
)
static

projects the values in the grid on the Y axis

Parameters
pGridinput grid to project
template<class T >
std::vector< common::IntensityPoint > stira::imagetools::NumberGridTools< T >::ProjectGridOnY ( ArrayGrid< T > *  pGrid)
static

projects the values in the grid on the X axis

Parameters
pGridinput grid to project

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

template<class T >
std::vector< common::IntensityPoint > stira::imagetools::NumberGridTools< T >::ProjectGridOnY ( ArrayGrid< T > *  pGrid,
int  xTopLeft,
int  yTopLeft,
int  xBottomRight,
int  yBottomRight 
)
static
template<class T >
ArrayGrid< double > * stira::imagetools::NumberGridTools< T >::Rotate180Degrees ( ArrayGrid< double > *  pGrid)
static
template<class T >
ArrayGrid< double > * stira::imagetools::NumberGridTools< T >::Rotate90DegreesClockwise ( ArrayGrid< double > *  pGrid)
static
template<class T >
ArrayGrid< double > * stira::imagetools::NumberGridTools< T >::Rotate90DegreesCounterClockwise ( ArrayGrid< double > *  pGrid)
static

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