STIRA
0.1
|
Generates different predefined grids. More...
#include <GridGenerator.h>
Public Member Functions | |
GridGenerator () | |
constructor | |
~GridGenerator () | |
destructor | |
Static Public Member Functions | |
static ArrayGrid< double > * | GenerateEmpty (int width=256, int height=256, double intensity=127.0) |
generates a flat image of given dimensions and given constant intensity More... | |
static ArrayGrid< double > * | GenerateEmptyPlusGaussianNoise (int width=256, int height=256, double intensity=127.0, double sigma=10.0) |
generates a flat image of given dimensions and given constant intensity contaminated with gaussian noise with given sigma More... | |
static ArrayGrid< double > * | GenerateHorizontalGradient (int width=256, int height=256) |
generates a simple grid with horizontal intensity gradient More... | |
static ArrayGrid< double > * | GenerateVerticalGradient (int width=256, int height=256) |
generates a simple grid with horizontal intensity gradient More... | |
static ArrayGrid< double > * | GenerateHorizontalSineWave (int width, int height, double frequency) |
generates a simple grid with a horizontal frequency sine wave More... | |
static ArrayGrid< double > * | GenerateVerticalSineWave (int width, int height, double frequency) |
generates a simple grid with vertical frequency sine wave More... | |
static ArrayGrid< double > * | GenerateEuclideanSpots (int width, int height, double frequency) |
generates a simple grid with Euclidean spot intensities Used in AM halftoning; see PhD Stefaan Lippens, Ghent University, 2008-2009: "Advanced Techniques for Digital Halftoning", p 194 eq 7.4 More... | |
static ArrayGrid< double > * | GenerateStarChart (int sideSize, int nrPeriods) |
generates a square with a star-shaped structure In fact a sine that goes in polar coordinates nrPeriods times over the angular polar coordinate, while kept constant along the radial polar coordinate More... | |
static ArrayGrid< double > * | GenerateBars (int width, int height, int barWidth=50) |
generates a grid of alternating horizontal black and white bars A version of this pattern where the bars become gradually blurred more and more is placed under filter::GaussConvolve for dependancy reasons (depends on gaussian filtering) More... | |
static ArrayGrid< double > * | GenerateLine (int width, int height, double length, double angle) |
static ArrayGrid< double > * | GenerateSquare (int width, int height, double suqareWidth) |
static ArrayGrid< double > * | GenerateDisk (int width, int height, double diskWidth) |
static ArrayGrid< double > * | GenerateAiry (int width, int height, double airyWidth) |
generates an Airy filter kernel more details, see http://en.wikipedia.org/wiki/Airy_disc More... | |
static ArrayGrid< double > * | GenerateGaussian (int width, int height, double sigma) |
generates a circular symmetric Gaussian filter kernel More... | |
static ArrayGrid< double > * | GenerateGaussian (int width, int height, double sigmaX, double sigmaY) |
generates a Gaussian filter kernel More... | |
static ArrayGrid< double > * | GenerateGaussian (int width, int height, double sigma1, double sigma2, double rho) |
generates a Gaussian filter kernel More... | |
static ArrayGrid< double > * | GenerateGaussianFirstDerivativeX (int width, int height, double sigmaX, double sigmaY) |
generates a first derivative in x of Gaussian filter kernel More... | |
static ArrayGrid< double > * | GenerateGaussianFirstDerivativeY (int width, int height, double sigmaX, double sigmaY) |
generates a first derivative in y of Gaussian filter kernel More... | |
static ArrayGrid< double > * | GenerateGaussianSecondDerivativeX (int width, int height, double sigmaX, double sigmaY) |
generates a second derivative in x of Gaussian filter kernel More... | |
static ArrayGrid< double > * | GenerateGaussianSecondDerivativeY (int width, int height, double sigmaX, double sigmaY) |
generates a second derivative in y of Gaussian filter kernel More... | |
static ArrayGrid< double > * | GenerateGaussianMixedDerivativesXY (int width, int height, double sigmaX, double sigmaY) |
generates mixed first derivatives in x and y of Gaussian filter kernel More... | |
static ArrayGrid< double > * | GenerateDeltaPeak (int width, int height, int x, int y, double intensity) |
generates delta peak More... | |
static ArrayGrid< double > * | GenerateInverseZonePlate () |
generates the inverse zoneplate test image 512x512 pixels | |
static ArrayGrid< double > * | GenerateZonePlate () |
generates the classical zoneplate test image 512x512 pixels | |
static ArrayGrid< double > * | GenerateLogFrequencyContrastChart () |
generates Log Frequency-Contrast test image as shown on http://www.imatest.com/docs/log_f_Cont.html Change in frequency here is exponential of sqrt of x (empirical) Change in contrast is inverse square of y (like in doc imatest) | |
static ArrayGrid< double > * | GenerateSheppLogan (double factor=1.0) |
generates the classical Shepp-Logan phantom for CT 512x512 pixels Based on http://server.oersted.dtu.dk/ftp/jaj/31655/ct_programs/ (no longer available) Hugh Murrell, Computer Aided Tomography, The Mathematica Journal, 1996, Vol 6, No. 2, pp.60-65 similar to java code of Thevenaz found on http://bigwww.epfl.ch/thevenaz/shepplogan/ More... | |
static ArrayGrid< int > * | GenerateIsingTexture () |
generates a random field texture using Ising model and simulated annealing | |
Generates different predefined grids.
|
static |
generates an Airy filter kernel more details, see http://en.wikipedia.org/wiki/Airy_disc
width | width of the grid |
height | height of the grid |
airyWidth | width of the PSF |
References stira::imagedata::ArrayGrid< T >::DivideBy(), stira::imagedata::ArrayGrid< T >::GetValue(), and stira::imagedata::ArrayGrid< T >::SetValue().
Referenced by stira::deconvolve::SimulateDegradation::~SimulateDegradation().
|
static |
generates a grid of alternating horizontal black and white bars A version of this pattern where the bars become gradually blurred more and more is placed under filter::GaussConvolve for dependancy reasons (depends on gaussian filtering)
width | width of the test pattern |
height | height of the test pattern |
barWidth | width of a bar in the image |
References stira::common::DrawFigures::BresenhamDrawLine(), stira::imagedata::ArrayGrid< T >::DivideBy(), stira::imagedata::ArrayGrid< T >::GetValue(), and stira::imagedata::ArrayGrid< T >::SetValue().
Referenced by stira::filter::GaussConvolve::CreateBlurredBars().
|
static |
generates delta peak
width | width of the grid |
height | height of the grid |
x | x coordinate of delta peak |
y | y coordinate of delta peak |
intensity | intensity of delta peak Well, normally, we would have an infinite peak at a mathematical point, but a pixel is not a mathematical point, so we allow extra scaling how high this peak is |
References stira::imagedata::ArrayGrid< T >::SetValue().
|
static |
generates a flat image of given dimensions and given constant intensity
width | width of grid to generate |
heigh | height of grid to generate |
intensity | constant intensity for all grid pixels |
|
static |
generates a flat image of given dimensions and given constant intensity contaminated with gaussian noise with given sigma
width | width of grid to generate |
heigh | height of grid to generate |
intensity | constant intensity for all grid pixels |
sigma | sigma of the Gaussian noise (mu = 0) |
References stira::imagedata::ArrayGrid< T >::SetValue().
|
static |
generates a simple grid with Euclidean spot intensities Used in AM halftoning; see PhD Stefaan Lippens, Ghent University, 2008-2009: "Advanced Techniques for Digital Halftoning", p 194 eq 7.4
width | width of grid to generate |
height | height of grid to generate |
frequency | frequency of the spots |
References stira::imagedata::ArrayGrid< T >::SetValue().
|
static |
generates a circular symmetric Gaussian filter kernel
width | width of the grid |
height | height of the grid |
sigma | sigma of the PSF |
Referenced by stira::filter::GaussConvolve::DerivativeConvolveFFT(), stira::fouriertools::FFT::GaussConvolve(), stira::filter::DifferenceOfGaussians::Run(), and stira::deconvolve::SimulateDegradation::~SimulateDegradation().
|
static |
generates a Gaussian filter kernel
width | width of the grid |
height | height of the grid |
sigmaX | sigma in x direction for the PSF |
sigmaY | sigma in y direction for the PSF |
References stira::imagedata::ArrayGrid< T >::DivideBy(), stira::common::MathUtils::Gaussian(), stira::imagedata::ArrayGrid< T >::GetValue(), and stira::imagedata::ArrayGrid< T >::SetValue().
|
static |
generates a Gaussian filter kernel
width | width of the grid |
height | height of the grid |
sigma1 | sigma1 for the PSF |
sigma2 | sigma2 for the PSF |
rho | rho for the PSF ( must be in ] -1, 1 [ or we divide by 0 ) |
References stira::imagedata::ArrayGrid< T >::DivideBy(), stira::imagedata::ArrayGrid< T >::GetValue(), and stira::imagedata::ArrayGrid< T >::SetValue().
|
static |
generates a first derivative in x of Gaussian filter kernel
width | width of the grid |
height | height of the grid |
sigma | sigma for the filter kernel |
References stira::common::MathUtils::GaussianDx(), stira::imagedata::ArrayGrid< T >::GetValue(), and stira::imagedata::ArrayGrid< T >::SetValue().
Referenced by stira::filter::GaussConvolve::DerivativeConvolveFFT().
|
static |
generates a first derivative in y of Gaussian filter kernel
width | width of the grid |
height | height of the grid |
sigma | sigma for the filter kernel |
References stira::common::MathUtils::GaussianDy(), stira::imagedata::ArrayGrid< T >::GetValue(), and stira::imagedata::ArrayGrid< T >::SetValue().
Referenced by stira::filter::GaussConvolve::DerivativeConvolveFFT().
|
static |
generates mixed first derivatives in x and y of Gaussian filter kernel
width | width of the grid |
height | height of the grid |
sigma | sigma for the filter kernel |
References stira::common::MathUtils::GaussianDxDy(), stira::imagedata::ArrayGrid< T >::GetValue(), and stira::imagedata::ArrayGrid< T >::SetValue().
Referenced by stira::filter::GaussConvolve::DerivativeConvolveFFT().
|
static |
generates a second derivative in x of Gaussian filter kernel
width | width of the grid |
height | height of the grid |
sigma | sigma for the filter kernel |
References stira::common::MathUtils::GaussianSecondDerivateX1D(), stira::imagedata::ArrayGrid< T >::GetValue(), and stira::imagedata::ArrayGrid< T >::SetValue().
Referenced by stira::filter::GaussConvolve::DerivativeConvolveFFT().
|
static |
generates a second derivative in y of Gaussian filter kernel
width | width of the grid |
height | height of the grid |
sigma | sigma for the filter kernel |
References stira::common::MathUtils::GaussianD2y(), and stira::imagedata::ArrayGrid< T >::SetValue().
Referenced by stira::filter::GaussConvolve::DerivativeConvolveFFT().
|
static |
generates a simple grid with horizontal intensity gradient
width | width of grid to generate |
height | height of grid to generate |
References stira::imagedata::ArrayGrid< T >::SetValue().
|
static |
generates a simple grid with a horizontal frequency sine wave
width | width of grid to generate |
height | height of grid to generate |
frequency | frequency of the sine wave |
References stira::imagedata::ArrayGrid< T >::SetValue().
|
static |
generates the classical Shepp-Logan phantom for CT 512x512 pixels Based on http://server.oersted.dtu.dk/ftp/jaj/31655/ct_programs/ (no longer available) Hugh Murrell, Computer Aided Tomography, The Mathematica Journal, 1996, Vol 6, No. 2, pp.60-65 similar to java code of Thevenaz found on http://bigwww.epfl.ch/thevenaz/shepplogan/
factor | factor with which to multiply the intensities inside the small inner ellipses to modify the contrast |
References stira::imagedata::ArrayGrid< T >::GetHeight(), stira::imagedata::ArrayGrid< T >::GetValue(), stira::imagedata::ArrayGrid< T >::GetWidth(), and stira::imagedata::ArrayGrid< T >::SetValue().
|
static |
generates a square with a star-shaped structure In fact a sine that goes in polar coordinates nrPeriods times over the angular polar coordinate, while kept constant along the radial polar coordinate
sideSize | size of single side of the square |
nrPeriods | number of periods of the sine wave along the angular coordinate |
References stira::imagedata::ArrayGrid< T >::SetValue().
|
static |
generates a simple grid with horizontal intensity gradient
width | width of grid to generate |
height | height of grid to generate |
References stira::imagedata::ArrayGrid< T >::SetValue().
|
static |
generates a simple grid with vertical frequency sine wave
width | width of grid to generate |
height | height of grid to generate |
frequency | frequency of the sine wave |
References stira::imagedata::ArrayGrid< T >::SetValue().