|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--VolumeJ.VJInterpolator | +--VolumeJ.VJTrilinear
This class implements trilinear voxel interpolation and voxel gradient interpolation. It operates on volumes formatted as datatype[][][], datatype[][] and datatype[]. This class depends on the volume definitions in VolumeShort, VolumeRGB and VolumeFloat.
VolumeShort
,
VolumeFloat
,
Copyright (c) 1999-2003, Michael Abramoff. All rights reserved.
Constructor Summary | |
VJTrilinear()
|
Method Summary | |
protected static VJGradient |
gradient(byte[] v,
int height,
int width,
VJVoxelLoc vl)
Interpolate the gradient *xyz* in a byte volume. |
protected static VJGradient |
gradient(float[][][] v,
VJVoxelLoc vl)
Interpolate the gradient *xyz* in a float volume. |
protected static VJGradient |
gradient(short[][][] v,
int mask,
VJVoxelLoc vl)
Interpolate the gradient *xyz* in a short volume with a mask. |
protected static VJGradient |
gradient(short[][][] v,
VJVoxelLoc vl)
Interpolate the gradient *xyz* in a short volume. |
VJGradient |
gradient(Volume v,
VJVoxelLoc vl)
Compute an interpolated gradient from a volume. |
boolean |
isValid(VJVoxelLoc vl,
Volume v)
Does vl fall within the bounds of a volume for interpolation? |
boolean |
isValidGradient(VJCell c,
Volume v)
Does cell c fall within the bounds of a volume for nearest neighbor gradient interpolation? Bounds are -2...+3 of the cell location (translates to -2...+2 for the voxel location). |
boolean |
isValidGradient(VJVoxelLoc vl,
Volume v)
Does vl fall within the bounds of a volume for trilinear gradient interpolation? |
java.lang.String |
toString()
|
static boolean |
valid(int width,
int height,
int ix,
int iy)
Determine whether x,y are valid in an image width*height for bilinear interpolation. |
static float |
value(byte[] i,
int width,
int ix,
int iy,
float dx,
float dy)
Bilinear interpolation at (ix+dx, iy+dy) of 2D image organised as byte[]. |
protected static float |
value(byte[] v,
int height,
int width,
VJVoxelLoc vl)
Interpolate in a byte volume organized as a single array. |
protected static float |
value(float[][][][] v,
int dimension,
VJVoxelLoc vl)
Interpolate in a float 4D hypervolume in a single dimension. |
protected static float |
value(float[][][] v,
VJVoxelLoc vl)
Interpolate in a float volume. |
static float |
value(float[] i,
int width,
int ix,
int iy,
float dx,
float dy)
Bilinear interpolation at (ix+dx, iy+dy) of 2D image organised as float[]. |
static float |
value(int[] i,
int width,
int ix,
int iy,
float dx,
float dy)
Bilinear interpolation of brightness at (ix+dx, iy+dy) of 2D image organised as int[]. |
protected static float |
value(short[][][] v,
VJVoxelLoc vl)
Interpolate in a short volume. |
static float |
value(short[] i,
int width,
int ix,
int iy,
float dx,
float dy)
Bilinear interpolation at (ix+dx, iy+dy) of 2D image organised as short[]. |
VJValue |
value(VJValue voxel,
Volume v,
VJVoxelLoc vl)
Interpolate a volume. |
protected static float[] |
valueHS(float[] hs,
java.lang.Object[] sliceArray,
int width,
VJVoxelLoc vl)
Interpolate hue and saturation in an RGB int volume organized as an array of slices. |
Methods inherited from class VolumeJ.VJInterpolator |
valueHS |
Methods inherited from class java.lang.Object |
|
Constructor Detail |
public VJTrilinear()
Method Detail |
public boolean isValid(VJVoxelLoc vl, Volume v)
isValid
in class VJInterpolator
vl
- a VJVoxelLoc for which you want to know whether it falls inside the bounds,
taking account of support.startx
- ... endz the bounds of the volume.boolean
- whether or not vl falls within the bounds.public boolean isValidGradient(VJVoxelLoc vl, Volume v)
isValidGradient
in class VJInterpolator
vl
- a VJVoxelLoc for which you want to know whether it falls inside the bounds,
taking account of support for the gradient kernel.v
- the volume.boolean
- whether or not vl falls within the bounds.public boolean isValidGradient(VJCell c, Volume v)
isValidGradient
in class VJInterpolator
c
- a VJCell for which you want to know whether it falls inside the bounds,
taking account of support for the gradient kernel.v
- the volume.boolean
- whether or not c falls within the bounds.public VJValue value(VJValue voxel, Volume v, VJVoxelLoc vl)
value
in class VJInterpolator
voxel
- a VJValue which will contain the interpolated voxel value on exit.v
- a volumevl
- a location in the volume.public VJGradient gradient(Volume v, VJVoxelLoc vl)
gradient
in class VJInterpolator
v
- the volume.vl
- the VJVoxelLoc where to interpolate the gradientprotected static float value(float[][][] v, VJVoxelLoc vl)
v
- the volume in which to interpolatevl
- the location where to interpolate.protected static float value(short[][][] v, VJVoxelLoc vl)
v
- the volume in which to interpolatevl
- the location where to interpolate.protected static float value(float[][][][] v, int dimension, VJVoxelLoc vl)
v
- the volume in which to interpolatedimension
- the dimension in which to interpolate.vl
- the location where to interpolate.protected static float value(byte[] v, int height, int width, VJVoxelLoc vl)
v
- the volume array in which to interpolateheight
- the height of the volume.width
- the width of the volume.vl
- the location where to interpolate.protected static float[] valueHS(float[] hs, java.lang.Object[] sliceArray, int width, VJVoxelLoc vl)
hs
- a float[2] that will contain the interpolated hue and saturation on return.sliceArray
- the volume slice array in which to interpolatewidth
- the width of the volume.vl
- the location where to interpolate.protected static VJGradient gradient(float[][][] v, VJVoxelLoc vl)
v
- the volume in which to interpolatevl
- the location where to interpolate.protected static VJGradient gradient(short[][][] v, VJVoxelLoc vl)
v
- the volume in which to interpolatevl
- the location where to interpolate.protected static VJGradient gradient(byte[] v, int height, int width, VJVoxelLoc vl)
v
- the volume in which to interpolatevl
- the location where to interpolate.protected static VJGradient gradient(short[][][] v, int mask, VJVoxelLoc vl)
v
- the volume in which to interpolatevl
- the location where to interpolate.public java.lang.String toString()
toString
in class VJInterpolator
public static float value(float[] i, int width, int ix, int iy, float dx, float dy)
i
- the 2D image.width
- the width of the image.ix
- the integer x position at which to interpolate.iy
- the integer y position at which to interpolate.dx
- the x fractional positiondy
- the y fractional positionpublic static float value(byte[] i, int width, int ix, int iy, float dx, float dy)
i
- the 2D image.width
- the width of the image.ix
- the integer x position at which to interpolate.iy
- the integer y position at which to interpolate.dx
- the x fractional positiondy
- the y fractional positionpublic static float value(short[] i, int width, int ix, int iy, float dx, float dy)
i
- the 2D image.width
- the width of the image.ix
- the integer x position at which to interpolate.iy
- the integer y position at which to interpolate.dx
- the x fractional positiondy
- the y fractional positionpublic static float value(int[] i, int width, int ix, int iy, float dx, float dy)
i
- the 2D image.width
- the width of the image.ix
- the integer x position at which to interpolate.iy
- the integer y position at which to interpolate.dx
- the x fractional positiondy
- the y fractional positionpublic static boolean valid(int width, int height, int ix, int iy)
width
- the width of the image.height
- the height of the image.ix
- the integer x-positioniy
- the integer y-position.
|
BIJ API |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |