|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.xinapse.multisliceimage.ColourVolumeInterpolator
public class ColourVolumeInterpolator
An interpolator for a 3- (or fewer) dimensional array of pixels in a Colour image. Supported pixel data types are:
The ColourVolumeInterpolator interpolates to produce a set of interpolated colour values at an arbitrary set of locations.
Supported interpolation types are:
Supplied coordinates outside the field of view will yield the "missing colour value" pixel colour. This missing colour value defaults to black, but can be set to any other java.awt.Color. 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 ColourVolumeInterpolator, and any pixel samples outside the central portion have a colour equal to the "missing colour value".
| Constructor Summary | |
|---|---|
ColourVolumeInterpolator(byte[] pix,
PixelDataType dataType,
int nCols,
int nRows,
int nSlices,
float pixelXSize,
float pixelYSize,
float pixelZSize,
java.awt.Color missingColourValue,
InterpolationType interpolationType)
Creates a new ColourVolumeInterpolator for a block of colour (R,G,B) pixel samples. |
|
ColourVolumeInterpolator(ColourVolumeInterpolator interpolator,
InterpolationType newType)
Returns a new ColourVolumeInterpolator, constructed from an existing one. |
|
| Method Summary | |
|---|---|
void |
cancel()
Signal to this ColourVolumeInterpolator to stop the current interpolation (if an interpolation is in progress) as soon as possible. |
byte[] |
interpolate(float[] xyzArray,
byte[] colourArray)
Interpolate the intensity samples at a set of supplied coordinates. |
static void |
main(java.lang.String[] argv)
Run the test suite for ColourVolumeInterpolator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ColourVolumeInterpolator(byte[] pix,
PixelDataType dataType,
int nCols,
int nRows,
int nSlices,
float pixelXSize,
float pixelYSize,
float pixelZSize,
java.awt.Color missingColourValue,
InterpolationType interpolationType)
throws java.lang.InstantiationException
pix - the block of colour pixels 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.missingColourValue - the pixel value that that will be set for interpolated points that
are outside the block of pixels. If null, the default value of
java.awt.Color.black will be set.interpolationType - the InterpolationType to be used for interpolation. One of:
java.lang.InstantiationException - if the interpolationType is not supported.
public ColourVolumeInterpolator(ColourVolumeInterpolator interpolator,
InterpolationType newType)
throws java.lang.InstantiationException
interpolator - the existing ColourVolumeInterpolator.newType - the new IterpolationType to be used for interpolation. One of:
java.lang.InstantiationException - if the interpolationType is not supported.| Method Detail |
|---|
public void cancel()
public byte[] interpolate(float[] xyzArray,
byte[] colourArray)
throws MultiSliceImageException,
com.xinapse.util.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.colourArray - the array into which the interpolated pixel colours will be placed.
If intensityArray is null, a new array will be allocated.
MultiSliceImageException - if the intensityArray is of the wrong length for the number
of pixel (x,y,z) coordinates supplied, or if the data type isn't supported.
com.xinapse.util.CancelledException - if the interpolation halts prematurely because it has been
cancelled.public static void main(java.lang.String[] argv)
argv - is ignored.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||