IMAGESETINTERPOLATION(3) 1 IMAGESETINTERPOLATION(3)imagesetinterpolation - Set the interpolation methodSYNOPSIS
bool imagesetinterpolation (resource $image, [int $method = IMG_BILINEAR_FIXED])
DESCRIPTION
Sets the interpolation method, setting an interpolation method affects the rendering of various functions in GD, such as the imagero-
tate(3) function.
PARAMETERS
o $
image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3).
o $method
- The interpolation method, which can be one of the following:
o IMG_BELL: Bell filter.
o IMG_BESSEL: Bessel filter.
o IMG_BICUBIC: Bicubic interpolation.
o IMG_BICUBIC_FIXED: Fixed point implementation of the bicubic interpolation.
o IMG_BILINEAR_FIXED: Fixed point implementation of the bilinear interpolation ( default (also on image creation)).
o IMG_BLACKMAN: Blackman window function.
o IMG_BOX: Box blur filter.
o IMG_BSPLINE: Spline interpolation.
o IMG_CATMULLROM: Cubic Hermite spline interpolation.
o IMG_GAUSSIAN: Gaussian function.
o IMG_GENERALIZED_CUBIC: Generalized cubic spline fractal interpolation.
o IMG_HERMITE: Hermite interpolation.
o IMG_HAMMING: Hamming filter.
o IMG_HANNING: Hanning filter.
o IMG_MITCHELL: Mitchell filter.
o IMG_POWER: Power interpolation.
o IMG_QUADRATIC: Inverse quadratic interpolation.
o IMG_SINC: Sinc function.
o IMG_NEAREST_NEIGHBOUR: Nearest neighbour interpolation.
o IMG_WEIGHTED4: Weighting filter.
o IMG_TRIANGLE: Triangle interpolation.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
imagesetinterpolation(3) example
<?php
// Load an image
$im = imagecreate(500, 500);
// By default interpolation is IMG_BILINEAR_FIXED, switch
// to use the 'Mitchell' filter:
imagesetinterpolation($im, IMG_MITCHELL);
// Continue to work with $im ...
?>
NOTES
Changing the interpolation method affects the following functions when rendering:
oimageaffine(3)oimagerotate(3)oimagescale(3)PHP Documentation Group IMAGESETINTERPOLATION(3)
Check Out this Related Man Page
probe(1) The Computational Morphometry Toolkit probe(1)NAME
probe - Probe image data.
SYNOPSIS
probe InputImage
DESCRIPTION
This tool prints pixel values or symbolic labels at a list of user-provided image coordinates.
OPTIONS
Global Toolkit Options (these are shared by all CMTK tools)
--help
Write list of basic command line options to standard output.
--help-all
Write complete list of basic and advanced command line options to standard output.
--wiki
Write list of command line options to standard output in MediaWiki markup.
--man
Write man page source in 'nroff' markup to standard output.
--version
Write toolkit version to standard output.
--echo
Write the current command line to standard output.
--verbose-level <integer>
Set verbosity level.
--verbose, -v
Increment verbosity level by 1 (deprecated; supported for backward compatibility).
--threads <integer>
Set maximum number of parallel threads (for POSIX threads and OpenMP).
Main Options
--coordinates
Coordinate specification mode. Supported values: "indexed", "absolute", "relative", "physical", or use one of the following:
--indexed
Use grid indexes to specify coordinates. For each dimension, the valid value range is [0,Dims-1].
--absolute
Use absolute volume coordinates. For each dimension, the valid range is [0,FOV].
--relative
Use relative volume coordinates. For each dimension, the valid range is [0,1].
--physical
Use physical volume coordinates. Each given location is transformed into image coordinates via the inverse of the images's index-
to-physical space matrix.
--interpolation
Image interpolation method. Supported values: "nn", "linear", "cubic", "pv", "sinc-cosine", "sinc-hamming", where the default is
"nn", or use one of the following:
--nn Nearest neighbor interpolation [This is the default]
--linear
Trilinear interpolation
--cubic
Tricubic interpolation
--pv Partial volume interpolation
--sinc-cosine
Sinc interpolation with cosine window
--sinc-hamming
Sinc interpolation with Hamming window
--sinc-window-radius <integer>
Window radius for Sinc interpolation [Default: 3]
--no-reorient
Disable image reorientation into RAS alignment.
AUTHORS
Torsten Rohlfing, with contributions from Michael P. Hasak, Greg Jefferis, Calvin R. Maurer, and Daniel B. Russakoff
LICENSE
http://www.fsf.org/licensing/licenses/gpl.html
BUGS
Report bugs at http://nitrc.org/projects/cmtk/
ACKNOWLEDGMENTS
From April 2009 through September 2011, CMTK Development and Maintenance was supported by the National Institute of Biomedical Imaging and
Bioengineering under Grant No.R01 EB008381 (PI: Torsten Rohlfing).
CMTK 2.2.2 Jul 20 2012 probe(1)