
ImageND(3) User Contributed Perl Documentation ImageND(3)
NAME
PDL::ImageND  useful image processing routines which work in Ndimensions
DESCRIPTION
In some cases (though not as many as one would like) it is possible to write general rou
tines that operate on Ndimensional objects.
An example in this module is a NDim convolution algorithm I made up one day  it works
but the boundary condtions are a bit funny.
SYNOPSIS
use PDL::ImageND;
FUNCTIONS
convolve
Signature: (a(m); b(n); int adims(p); int bdims(q); [o]c(m))
Ndimensional convolution algorithm.
$new = convolve $a, $kernel
Convolve an array with a kernel, both of which are Ndimensional.
Note because of the algorithm used (writing Ndim routines is not easy on the brain!) the
boundary conditions are a bit strange. They wrap, but up to the NEXT row/col
umn/cubeslice/etc. If this is a problem consider using zeropadding or something.
ninterpol()
Ndimensional interpolation routine
Signature: ninterpol(point(),data(n),[o]value())
$value = ninterpol($point, $data);
"ninterpol" uses "interpol" to find a linearly interpolated value in N dimensions, assum
ing the data is spread on a uniform grid. To use an arbitrary grid distribution, need to
find the gridspace point from the indexing scheme, then call "ninterpol"  this is far
from trivial (and illdefined in general).
rebin
Signature: (a(m); [o]b(n); int ns => n)
Ndimensional rebinning algorithm
$new = rebin $a, $dim1, $dim2,..;. $new = rebin $a, $template; $new = rebin $a, $tem
plate, {Norm => 1};
Rebin an Ndimensional array to newly specified dimensions. Specifying `Norm' keeps the
sum constant, otherwise the intensities are kept constant. If more template dimensions
are given than for the input pdl, these dimensions are created; if less, the final dimen
sions are maintained as they were.
So if $a is a 10 x 10 pdl, then "rebin($a,15)" is a 15 x 10 pdl, while
"rebin($a,15,16,17)" is a 15 x 16 x 17 pdl (where the values along the final dimension are
all identical).
circ_mean_p
Calculates the circular mean of an ndim image and returns the projection. Optionally
takes the center to be used.
$cmean=circ_mean_p($im);
$cmean=circ_mean_p($im,{Center => [10,10]});
circ_mean
Smooths an image by applying circular mean. Optionally takes the center to be used.
circ_mean($im);
circ_mean($im,{Center => [10,10]});
AUTHORS
Copyright (C) Karl Glazebrook 1997. All rights reserved. There is no warranty. You are
allowed to redistribute this software / documentation under certain conditions. For
details, see the file COPYING in the PDL distribution. If this file is separated from the
PDL distribution, the copyright notice should be included in the file.
perl v5.8.0 20030129 ImageND(3) 
