|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.xinapse.multisliceimage.VolumeInterpolator
public abstract class VolumeInterpolator
An interpolator for a 3- (or fewer) dimensional array of pixels. Supported pixel data types are:
The VolumeInterpolator always interpolates to produce a set of floating point interpolated values at an arbitrary set of locations, regardless of the PixelDataType of the pixel samples to be interpolated. For complex data types, the floating point values are in interleaved (real/imaginary) pairs and the length of the returned array of values is twice the number of locations to be interpolated.
Supported interpolation types are:
Supplied coordinates outside the field of view will yield the "missing data value" pixel intensity. This missing data value defaults to zero, but can be set to any other (real) floating-point value. The result of any interpolation is the same as would result when iterpolating within an infinite array of pixel samples, where the central portion of samples is that supplied to form the VolumeInterpolator, and any pixel samples outside the central portion have an intensity equal to the "missing data value".
| Field Summary | |
|---|---|
protected PixelDataType |
dataType
The PixelDataType of the pixel values to be interpolated. |
protected int |
nCols
The number of columns in the block of pixels. |
protected int |
nRows
The number of rows in the block of pixels. |
protected int |
nSlices
The number of slices in the block of pixels. |
protected java.lang.Object |
pix
The array of pixel values to be interpolated. |
protected float |
pixelXSize
Horizontal pixel size in the block of pixels to be interpolated. |
protected float |
pixelYSize
Vertical pixel size in the block of pixels to be interpolated. |
protected float |
pixelZSize
Pixel depth in the block of pixels to be interpolated. |
| Method Summary | |
|---|---|
void |
cancel()
Signal to this VolumeInterpolator to stop the current interpolation (if an interpolation is in progress) as soon as possible, and throw a CancelledException. |
static InterpolationType[] |
getImplementedTypes()
Returns the types of interpolation that are implemented by the VolumeInterpolator class. |
static VolumeInterpolator |
getInstance(java.lang.Object pix,
PixelDataType dataType,
int nCols,
int nRows,
int nSlices,
float pixelXSize,
float pixelYSize,
float pixelZSize,
java.lang.Float missingDataValue,
InterpolationType type)
Returns a new VolumeInterpolator for a block of pixel samples. |
static VolumeInterpolator |
getInstance(java.lang.Object pix,
PixelDataType dataType,
int nCols,
int nRows,
int nSlices,
float pixelXSize,
float pixelYSize,
float pixelZSize,
InterpolationType type,
java.lang.Float missingDataValue)
Returns a new VolumeInterpolator for a block of pixel samples, with progress through the interpolation optionally being shown. |
static VolumeInterpolator |
getInstance(VolumeInterpolator interpolator,
InterpolationType newType)
Returns a new VolumeInterpolator, constructed from an existing one. |
static InterpolationType[] |
getSupportedInterpolationTypes()
Returns an array of interpolation types currently supported by the VolumeInterpolator class. |
abstract float[] |
interpolate(float[] xyzArray,
float[] intensityArray)
Interpolate the intensity samples at a set of supplied coordinates. |
static void |
main(java.lang.String[] argv)
Run the test suite for VolumeInterpolator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.lang.Object pix
protected PixelDataType dataType
protected int nCols
protected int nRows
protected int nSlices
protected float pixelXSize
protected float pixelYSize
protected float pixelZSize
| Method Detail |
|---|
public void cancel()
public static InterpolationType[] getSupportedInterpolationTypes()
public abstract float[] interpolate(float[] xyzArray,
float[] intensityArray)
throws CancelledException
xyzArray - the x,y,z coordinates of each of the new sample locations. The x, y and z
coordinates are supplied in interlaced order: x0, y0, z0, x1, y1, z1, .... xN-1, yN-1, zN-1.intensityArray - the array into which the interpolated pixel intensities will be placed.
If intensityArray is null, a new array will be allocated.
java.lang.IndexOutOfBoundsException - if the intensityArray is of the wrong length for the number
of pixel (x,y,z) coordinates supplied.
CancelledException - if the interpolation halts prematurely because it has been
cancelled.
public static VolumeInterpolator getInstance(java.lang.Object pix,
PixelDataType dataType,
int nCols,
int nRows,
int nSlices,
float pixelXSize,
float pixelYSize,
float pixelZSize,
java.lang.Float missingDataValue,
InterpolationType type)
throws java.lang.InstantiationException
pix - the set of intensities to be interpolated.dataType - the PixelDataType of the block of pixels.nCols - the number of columns in the block of pixels.nRows - the number of rows in the block of pixels.nSlices - the number of slices in the block of pixels.pixelXSize - the pixel width.pixelYSize - the pixel height.pixelZSize - the pixel depth.missingDataValue - the pixel value that that will be set for interpolated points that
are outside the block of pixels. If null, the default value of 0.0 will be set.type - the InterpolationType to be used for interpolation. One of:
java.lang.InstantiationException
public static VolumeInterpolator getInstance(java.lang.Object pix,
PixelDataType dataType,
int nCols,
int nRows,
int nSlices,
float pixelXSize,
float pixelYSize,
float pixelZSize,
InterpolationType type,
java.lang.Float missingDataValue)
throws java.lang.InstantiationException
pix - the set of intensities to be interpolated.dataType - the PixelDataType of the block of pixels.nCols - the number of columns in the block of pixels.nRows - the number of rows in the block of pixels.nSlices - the number of slices in the block of pixels.pixelXSize - the pixel width.pixelYSize - the pixel height.pixelZSize - the pixel depth.missingDataValue - the pixel value that that will be set for interpolated points that
are outside the block of pixels. If null, the default value of 0.0 will be set.type - the InterpolationType to be used for interpolation. One of:
java.lang.InstantiationException
public static VolumeInterpolator getInstance(VolumeInterpolator interpolator,
InterpolationType newType)
throws java.lang.InstantiationException
interpolator - the existing VolumeInterpolator.newType - the new IterpolationType to be used for interpolation. One of:
java.lang.InstantiationExceptionpublic static void main(java.lang.String[] argv)
argv - is ignored.public static InterpolationType[] getImplementedTypes()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||