Class VolumeInterpolator

java.lang.Object
com.xinapse.image.VolumeInterpolator

public abstract class VolumeInterpolator extends Object
An interpolator for a 3- (or fewer) dimensional array of pixels. Supported pixel data types are: For Colour (R,G,B) images, use a ColourVolumeInterpolator.

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:

The origin (x=0, y=0, z=0) is assumed to be at the centre of the block of pixels, such that x values within the block go from x=-FoVx/2 to x=+FoVx/2 where FoVx is the field of view in the x-direction (with similar specification for y and z). The array of pixels to be interpolated is inset within the block such that there is half a pixel distance between the edges of the field of view and the first and last samples (i.e., FoVx = pixelXSize * number of columns, etc.).

Supplied coordinates outside the field of view will yield a value that depends on the BoundaryCondition. For BoundaryCondition.FIXED, the interpolated intensities are equal to the "fixedValue" outside the field of view. This fixed 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 "fixedValue".

  • Field Details

    • MAX_INTERPOLATIONS_BEFORE_MULTITHREADING

      protected static final int MAX_INTERPOLATIONS_BEFORE_MULTITHREADING
      The maximum number of interpolations that is performed in a singkle method call before the procedure is multi-threaded.
      See Also:
    • pix

      protected final Object pix
      The array of pixel values to be interpolated.
    • dataType

      protected PixelDataType dataType
      The PixelDataType of the pixel values to be interpolated.
    • nCols

      protected int nCols
      The number of columns in the block of pixels.
    • nRows

      protected int nRows
      The number of rows in the block of pixels.
    • nSlices

      protected int nSlices
      The number of slices in the block of pixels.
    • pixelXSize

      protected float pixelXSize
      Horizontal pixel size in the block of pixels to be interpolated.
    • pixelYSize

      protected float pixelYSize
      Vertical pixel size in the block of pixels to be interpolated.
    • pixelZSize

      protected float pixelZSize
      Pixel depth in the block of pixels to be interpolated.
    • stopMe

      protected Boolean stopMe
      A Flag to indicate that this VolumeInterpolator should stop the current interpolation, (if an interpolation is in progress) and throw a CancellationException.
  • Method Details