public class ImgProc
extends java.lang.Object
miscellaneous image processing routines
WO 3/18/03 notes on static array indices: when A[][] is passed to a
"public static" function, upon returning the parent function call will
revert back to the memory address value of the original A[][] variable. I.e.
if in the child function you have: A = B; where A[][] and B[][] this sets
the memory value of A to that of B's, and upon returning A will
be given it's old memory value and thus this change to A will be lost.
If, instead, you change an element or subarray of A via:
A[i][j] = x; or A[i] = B[i]; that parent memory value of A is not altered
and thus these changes are kept in the return to the parent function.
Thus I had a call to edgeFinderReplaceA(A) and inside it I had a call
A = gradient2D(A); which returned in A a new top-level memory address
and upon returning from edgeFinderReplaceA() the gradient changes were lost.
However, by changing the code to:
for (int i=0; i
Modifier and Type | Class and Description |
---|---|
static class |
ImgProc.ConvolveThread
note that this class is defined to run static function convolve.
|
static class |
ImgProc.CorrCalcThread
this class is to run the static function statsCorrCirc
|
static class |
ImgProc.DilateThread
note that this class is defined to run static function erode
WO 10/3/2012 This works by defining a unique Roi for each thread to work on. |
static class |
ImgProc.EdgeFillThread
note that this class is defined to run static function edgeFill
|
static class |
ImgProc.ErodeThread
This class is defined to run static function erode
WO 10/3/2012 This works by defining a unique Roi for each thread to work on. |
class |
ImgProc.MIPcalcStruc
public static byte[][][] distTransform (boolean[][][] origBinImg ) {
return distTransform(ArraysI.toByte(origBinImg));
} // 3D distance transform
public static byte[][][] distTransform( byte[][][] origBinImg ) {
int depth = origBinImg.length;
int width = origBinImg[0].length;
int height = origBinImg[0][0].length;
byte[][][] distmap = new byte[depth][width][height];
ArraysI.copy(origBinImg, distmap);
//WO for now invert the image
ArraysI.scale(distmap, 255,0);
// final int a = 3, b = 4, c = 3, d = 4, e = 5; //alternate weights
final int a = 3, b = 4, c = 5, d = 3, e = 7;
final int[] wf = new int[] { e, d, e, d, c, d, e, d, e, b, a, b, a,
255, 255, 255, 255, 255, };
final int[] wb = new int[] { 255, 255, 255, 255, 255, a, b, a, b, e, d,
e, d, c, d, e, d, e, };
int[] slask = new int[2 * 3 * 3];
// Border pixels are ignored to simplify the convolutions below
for (int z = 0; z < depth; z++)
for (int x = 0; x < width; x++)
for (int y = 0; y < height; y++)
if (z == 0 || x == 0 || y == 0 || z == depth - 1
|| y == height - 1 || x == width - 1)
distmap[z][x][y] = (byte) 0x0;
// Forward iteration
for (int z = 1; z < depth-1; z++) {
IJ.showProgress(z, 2 * depth - 2);
for (int x = 1; x < width-1; x++) {
for (int y = 1; y < height-1; y++) {
for (int k = -1; k < 1; k++)
for (int j = -1; j < 2; j++)
for (int i = -1; i < 2; i++) {
int slaskindex = (i+1)+ (j+1)*3 + (k+1)*3*3;
int pixel = distmap[z+k+1][x+i][y+j]&0xff;
// 0xff & ((byte[]) imRef.getStack().getPixels(z+k+1))[(x+i)+ (y+j)* width];
slask[slaskindex] = pixel + wf[slaskindex];
}
int minval = slask[0]; // the lowest value so far
for (int i = 1; i < slask.length; i++)
if ((slask[i]) < minval)
minval = (slask[i]);
// int pixel = 0xff & ((byte[]) imRef.getStack().getPixels(z+1))[(x)+ (y)* width];
int pixel = distmap[z+1][x][y]&0xff;
if (pixel > minval)
// ((byte[]) imRef.getStack().getPixels(z+1))[x + y*width] = (byte) (minval & 0xff);
distmap[z+1][x][y] = (byte) (minval);
} // end height(y)
} // end width(x)
} // end depth(z)
// Backward iteration
for (int z = depth-3; z > 0; z--) { // WO 3/08 changed from depth-2 to depth-3
IJ.showProgress(2 * depth - z, 2 * depth - 2);
for (int x = width-2; x > 0; x--) {
for (int y = height-2; y > 0; y--) {
for (int k = 0; k < 2; k++)
for (int j = -1; j < 2; j++)
for (int i = -1; i < 2; i++) {
int slaskindex = (i+1)+ (j+1)*3+ (k)*3*3;
int pixel = distmap[z+k+1][x+i][y+j]&0xff;
// = 0xff & ((byte[]) imRef.getStack().getPixels(z+k+1))[(x+i)+ (y+j)*width];
slask[slaskindex] = pixel + wb[slaskindex];
}
int minval = slask[0]; // the lowest value so far
for (int i = 1; i < slask.length; i++)
if ((slask[i]) < minval)
minval = (slask[i]);
int pixel = distmap[z+1][x][y]&0xff;
// = 0xff & ((byte[]) imRef.getStack().getPixels(z+1))[(x)+ (y)*width];
if (pixel > minval)
// ((byte[]) imRef.getStack().getPixels(z+1))[x + y*width] = (byte) (minval &0xff);
distmap[z+1][x][y] = (byte) (minval);
} // end height(y)
} // end width(x)
} // end depth(z)
return distmap;
} // 3D distance transform
|
Constructor and Description |
---|
ImgProc() |
Modifier and Type | Method and Description |
---|---|
static float[][][] |
addHalfBlock(float[][][] K,
float[] vnorm)
WO 8/6/2012 intent is to create a volume where the back half of the pixels are On, from
point passing through the center and oriented by surface normal.
|
static byte[][][] |
applyMask(byte[][][] A,
boolean[][][] mask) |
static byte[][][] |
applyMask(byte[][][] A,
byte[][][] mask) |
static byte[][] |
applyMask(byte[][] A,
byte[][] mask)
assumes you have binary mask with either 0 'OFF' or some value >0, meaning 'ON'
|
static byte[][] |
applyMask(byte[][] A,
byte[][] mask,
byte fillVal) |
static float[][] |
applyMask(float[][] A,
byte[][] mask) |
static float[][] |
applyMask(float[][] A,
byte[][] mask,
float fillVal) |
static short[][][] |
applyMask(short[][][] A,
boolean[][][] mask) |
static short[][][] |
applyMask(short[][][] A,
boolean[][][] mask,
short fillVal)
WO 9/24/07 added this to fill DICOM CT images with -1000 instead of Min(A)
|
static short[][][] |
applyMask(short[][][] A,
byte[][][] mask) |
static short[][][] |
applyMask(short[][][] A,
byte[][][] mask,
short fillVal)
WO 9/24/07 added this to fill DICOM CT images with -1000 instead of Min(A)
|
static short[][] |
applyMask(short[][] A,
boolean[][] mask) |
static short[][] |
applyMask(short[][] A,
boolean[][] mask,
short fillVal) |
static short[][] |
applyMask(short[][] A,
byte[][] mask) |
static short[][] |
applyMask(short[][] A,
byte[][] mask,
short fillVal) |
static byte[][][] |
aStatsCorrCirc(short[][][] pixels,
float[][][] kernel) |
static byte[][][] |
aStatsCorrCirc(short[][][] pixels,
float[][][][] kernels)
intentionally want non-parallel version, perhaps for small region analysis
|
static byte[][][] |
aStatsCorrCirc(short[][][] pixels,
float[][][][] kernels,
boolean[][][] mask)
WO version to use mask to speed up computation (which it does)
|
static byte[][][] |
aStatsCorrCirc(short[][][] pixels,
float[][][][] kernels,
boolean nonnegK,
boolean[][][] mask,
int sd,
int sw,
int sh,
int fd,
int fw,
int fh)
WO 2/15/11 added check whether at any image pixel, the overlapping kernel extends over the
mask (out of lung space into chest wall), in which case the NCCC is computed only over the
masked (lung) pixels, requiring a separate calc of Syy and kernel avg over just those points
|
static byte[][][] |
aStatsCorrCirc(short[][][] pixels,
float[][][][] kernels,
boolean nonnedKflag,
int sd,
int sw,
int sh,
int fd,
int fw,
int fh) |
static byte[][][] |
aStatsCorrCirc(short[][][] pixels,
float[][][][] kernels,
int sd,
int sw,
int sh,
int fd,
int fw,
int fh) |
static byte[][][] |
aStatsCorrCirc(short[][][] pixels,
float[][][] kernel,
boolean[][][] mask) |
static byte[][][] |
aStatsCorrCirc(short[][][] pixels,
float[][][] kernel,
boolean nonnedKflag,
boolean[][][] mask,
int sd,
int sw,
int sh,
int fd,
int fw,
int fh) |
static byte[][][] |
aStatsCorrCirc(short[][][] pixels,
float[][][] kernel,
boolean nonnedKflag,
int sd,
int sw,
int sh,
int fd,
int fw,
int fh) |
static byte[][][] |
aStatsCorrCirc(short[][][] pixels,
float[][][] kernel,
int sd,
int sw,
int sh,
int fd,
int fw,
int fh) |
static int |
autoThreshold(byte[][] A)
returns the threshold value as int, and applies the threshold to the image
based on ij.byteProcessor().getAutoThreshold()
|
static int |
autoThreshold(byte[][][] A) |
static int |
autoThreshold(short[][] AA)
WO 8/30/2010 for short images
|
static int |
autoThreshold(short[][][] AA) |
static short[][][] |
binImage(short[][][] A,
int nbins) |
static short[][][] |
binImage(short[][][] A,
int[] histoBinStarts)
assumes bin centers based on 0..255 (or 128 or whatever) image range == histo
|
static void |
biThreshold(byte[][][] A,
int minthresh,
int maxthresh)
threshold to middle range, including the min,max thresh values.
|
static void |
biThreshold(short[][][] A,
int minthresh,
int maxthresh) |
static float[] |
calcPlaneThroughPoints(int[] xs,
int[] ys,
int[] zs) |
static float[] |
calcPlaneThroughPoints(Point3Dint[] pts)
8/6/2012 intent to find normal to plane passing through the given points,
using plane = ax + by + cz + d =0 where the normal = {a,b,c} and the plane passes through
the centroid of the poitns array (I think this is arbitrary -- can pick any point -- since I
only care about the normal direction.
|
static boolean[][][] |
cleanUpMask(boolean[][][] A,
float closingOpSize,
float mmPPxy,
float mmPPz,
int seedx,
int seedy,
int seedz)
WO 12/21/2014 clean up mask to remove internal holes and edge noise.
|
static void |
clip(byte[][][] A,
int thresh) |
static void |
clip(byte[][][] A,
int thresh,
int newval) |
static void |
clip(byte[][] A,
int thresh)
cut off above thresh
|
static void |
clip(byte[][] A,
int thresh,
int newval) |
static void |
clip(float[][][] A,
float thresh) |
static void |
clip(float[][][] A,
float thresh,
float newval) |
static void |
clip(float[][] A,
float thresh) |
static void |
clip(float[][] A,
float thresh,
float newval) |
static void |
clip(int[][][] A,
int thresh) |
static void |
clip(int[][][] A,
int thresh,
int newval) |
static void |
clip(int[][] A,
int thresh) |
static void |
clip(int[][] A,
int thresh,
int newval) |
static void |
clip(short[][][] A,
int thresh) |
static void |
clip(short[][][] A,
int thresh,
int newval) |
static void |
clip(short[][] A,
int thresh) |
static void |
clip(short[][] A,
int thresh,
int newval) |
static void |
clipbelow(float[][][] A,
float thresh) |
static void |
clipbelow(float[][][] A,
float thresh,
float newval) |
static void |
clipbelow(float[][] A,
float thresh) |
static void |
clipbelow(float[][] A,
float thresh,
float newval) |
static void |
clipbelow(int[][][] A,
int thresh) |
static void |
clipbelow(int[][][] A,
int thresh,
int newval) |
static void |
clipbelow(int[][] A,
int thresh) |
static void |
clipbelow(int[][] A,
int thresh,
int newval) |
static void |
clipbelow(short[][][] A,
int thresh) |
static void |
clipbelow(short[][][] A,
int thresh,
int newval) |
static void |
clipbelow(short[][] A,
int thresh)
cut off below thresh.
|
static void |
clipbelow(short[][] A,
int thresh,
int newval) |
static boolean[][][] |
closeOp(boolean[][][] A,
float searchRad) |
static boolean[][][] |
closeOp(boolean[][][] A,
float searchRad,
float zscale) |
static boolean[][][] |
closeOp(boolean[][][] A,
float searchRad,
float zscale,
boolean[][][] edgePts) |
static boolean[][][] |
closeOp(boolean[][][] A,
float searchRad,
float zscale,
Rectangle3D roi) |
static boolean[][][] |
closeOp(boolean[][][] A,
float searchRad,
Rectangle3D roi) |
static boolean[][][] |
closeOp(boolean[][][] A,
int searchRad) |
static boolean[][][] |
closeOp(boolean[][][] A,
int searchRad,
float zscale) |
static boolean[][][] |
closeOp(boolean[][][] A,
int searchRad,
float zscale,
Rectangle3D roi) |
static boolean[][][] |
closeOp(boolean[][][] A,
int searchRad,
Rectangle3D roi) |
static boolean[][] |
closeOp(boolean[][] A,
float searchRad) |
static boolean[][] |
closeOp(boolean[][] A,
float searchRad,
java.awt.Rectangle roi) |
static boolean[][] |
closeOp(boolean[][] A,
int searchRad) |
static boolean[][] |
closeOp(boolean[][] A,
int searchRad,
java.awt.Rectangle roi) |
static byte[][][] |
closeOp(byte[][][] A,
float searchRad) |
static byte[][][] |
closeOp(byte[][][] A,
float searchRad,
float zscale) |
static byte[][][] |
closeOp(byte[][][] A,
float searchRad,
float zscale,
Rectangle3D roi) |
static byte[][][] |
closeOp(byte[][][] A,
float searchRad,
Rectangle3D roi) |
static byte[][][] |
closeOp(byte[][][] A,
int searchRad) |
static byte[][][] |
closeOp(byte[][][] A,
int searchRad,
float zscale) |
static byte[][][] |
closeOp(byte[][][] A,
int searchRad,
float zscale,
Rectangle3D roi) |
static byte[][][] |
closeOp(byte[][][] A,
int searchRad,
Rectangle3D roi) |
static byte[][] |
closeOp(byte[][] A,
float searchRad) |
static byte[][] |
closeOp(byte[][] A,
float searchRad,
java.awt.Rectangle roi) |
static byte[][] |
closeOp(byte[][] A,
int searchRad)
binary image operation Close = erode(dilate(A))
|
static byte[][] |
closeOp(byte[][] A,
int searchRad,
java.awt.Rectangle roi) |
static void |
convolve(byte[][][] A,
float[][][] kernel) |
static void |
convolve(byte[][][] A,
float[][][] kernel,
int skipval)
WO 5/25/2012 modified to run in //, split slices up.
|
static byte[][][] |
convolve(byte[][][] pixels,
float[][][] kernel,
int start,
int end)
3D convolution
ArrayDisplay & NR conventions are pixels[depth][width][height] these functions directly below are meant to be invoked by the //-computing functions below them. |
static byte[][][] |
convolve(byte[][][] pixels,
float[][][] kernel,
int skipval,
int start,
int end)
WO 5/24/2012 skipval probably going to be 0 -- don't bother computing for points outside the image.
|
static byte[][] |
convolve(byte[][] pixels,
float[][] kernel) |
static void |
convolve(float[][][] A,
float[][][] kernel) |
static float[][][] |
convolve(float[][][] pixels,
float[][][] kernel,
int start,
int end) |
static float[][] |
convolve(float[][] pixels,
float[][] kernel)
2D convolution.
|
static void |
convolve(int[][][] A,
float[][][] kernel) |
static int[][][] |
convolve(int[][][] pixels,
float[][][] kernel,
int start,
int end) |
static float[][] |
convolve(int[][] pixels,
float[][] kernel) |
static void |
convolve(short[][][] A,
float[][][] kernel) |
static short[][][] |
convolve(short[][][] pixels,
float[][][] kernel,
int start,
int end) |
static short[][] |
convolve(short[][] pixels,
float[][] kernel) |
static byte[][][] |
convolveFreq(byte[][][] A,
float[][][] K) |
static float[][][] |
convolveFreq(float[][][] A,
float[][] kernel2D)
convolution usign fourier tranforms.
|
static float[][][] |
convolveFreq(float[][][] A,
float[][][] K) |
static int[][][] |
convolveFreq(int[][][] A,
float[][][] K) |
static short[][][] |
convolveFreq(short[][][] A,
float[][] kernel2D) |
static short[][][] |
convolveFreq(short[][][] A,
float[][][] K) |
static float[][][] |
correlation(float[][][] A,
float[][] kernel) |
static float[][][] |
correlation(float[][][] pixels,
float[][][] kernel) |
static float[][] |
correlation(float[][] pixels,
float[][] kernel)
2D correlation.
|
static float[][][] |
correlation(short[][][] A,
float[][] kernel) |
static float[][][] |
correlation(short[][][] pixels,
float[][][] kernel) |
static float[][] |
correlation(short[][] pixels,
float[][] kernel) |
static void |
createDicomProps(ij.ImagePlus imp) |
static void |
createDicomProps(ij.ImagePlus imp,
float estScaleW,
float estScaleH,
float estScaleD) |
static void |
createDicomProps(ij.ImagePlus imp,
float estScaleW,
float estScaleH,
float estScaleD,
float xdir0,
float xdir1,
float xdir2,
float ydir0,
float ydir1,
float ydir2) |
static void |
createDicomProps(ij.ImagePlus imp,
java.lang.String defaultDicomHeader) |
static void |
createDicomProps(ij.ImagePlus imp,
java.lang.String defaultDicomHeader,
float estScaleW,
float estScaleH,
float estScaleD,
float xdir0,
float xdir1,
float xdir2,
float ydir0,
float ydir1,
float ydir2)
props field is blank -- probably not a dicom image, but need workable header spatial info for
subsequent processing
|
static boolean[][][] |
dilate(boolean[][][] A,
float searchRad) |
static boolean[][][] |
dilate(boolean[][][] A,
float searchRad,
float zscale) |
static boolean[][][] |
dilate(boolean[][][] A,
float searchRad,
float zscale,
boolean[][][] edgePts)
WO 7/3/2012 trying version where you pass in all the points at the edge that matter for dilating.
|
static boolean[][][] |
dilate(boolean[][][] A,
float searchRad,
float zscale,
Rectangle3D roi)
WO 10/3/2012 parallel version.
|
static boolean[][][] |
dilate(boolean[][][] A,
float searchRad,
Rectangle3D roi) |
static boolean[][][] |
dilate(boolean[][][] A,
int searchRad) |
static boolean[][][] |
dilate(boolean[][][] A,
int searchRad,
float zscale) |
static boolean[][][] |
dilate(boolean[][][] A,
int searchRad,
float zscale,
Rectangle3D roi) |
static boolean[][][] |
dilate(boolean[][][] A,
int searchRad,
Rectangle3D roi) |
static boolean[][] |
dilate(boolean[][] A,
float searchRad) |
static boolean[][] |
dilate(boolean[][] A,
float searchRad,
java.awt.Rectangle roi) |
static boolean[][] |
dilate(boolean[][] A,
int searchRad) |
static boolean[][] |
dilate(boolean[][] A,
int searchRad,
java.awt.Rectangle roi) |
static byte[][][] |
dilate(byte[][][] A,
float searchRad) |
static byte[][][] |
dilate(byte[][][] A,
float searchRad,
float zscale) |
static byte[][][] |
dilate(byte[][][] A,
float searchRad,
float zscale,
Rectangle3D roi) |
static byte[][][] |
dilate(byte[][][] A,
float searchRad,
Rectangle3D roi) |
static byte[][][] |
dilate(byte[][][] A,
int searchRad) |
static byte[][][] |
dilate(byte[][][] A,
int searchRad,
float zscale) |
static byte[][][] |
dilate(byte[][][] A,
int searchRad,
float zscale,
Rectangle3D roi) |
static byte[][][] |
dilate(byte[][][] A,
int searchRad,
Rectangle3D roi) |
static byte[][] |
dilate(byte[][] A,
float searchRad) |
static byte[][] |
dilate(byte[][] A,
float searchRad,
java.awt.Rectangle roi) |
static byte[][] |
dilate(byte[][] A,
int searchRad)
WO dilate: if any pixels are ON within the circle, then turn the center ON.
|
static byte[][] |
dilate(byte[][] A,
int searchRad,
java.awt.Rectangle roi) |
static byte[][][] |
dilateGray(byte[][][] A,
boolean[][] mask) |
static byte[][] |
dilateGray(byte[][] A,
boolean[][] mask)
11/17/2014 intent is to implement a gray-scale filling operation that assigns to each pixel the maximum of
its neighbors, as indicated by the mask (kernel) image.
|
static short[][][] |
dilateGray(short[][][] A,
boolean[][] mask) |
static short[][] |
dilateGray(short[][] A,
boolean[][] mask) |
static byte[][][] |
dist3DfromPt(boolean[][][] vesselImg,
int seedz,
int seedx,
int seedy)
WO 3/29/08 my version computes essentially the cross-sectional area which is more robust than the
1D closest point in the version below
only computes distance at one point = the seed point 7/2/2012 this is messed up since a true distance would have to be float. |
static float[][][] |
distTransform_mm(boolean[][][] origBinImg,
float sliceThickness,
float mmPerPixelXY)
WO 8/22/2012 version to compute in mm
|
static float[][][] |
distTransformIsoVoxels(boolean[][][] origBinImg)
3D distance transform from http://www.pvv.org/~perchrh/imagej/DT3D_.java
gives only integeter outcomes so is not a true Eudlidan distance.
|
static boolean[][][] |
doDilate(boolean[][][] A,
float searchRad,
float zscale,
Rectangle3D roi)
10/4/2012 intent is to invoke this through the parallel version.
|
static boolean[][][] |
doErode(boolean[][][] A,
float searchRad,
float zscale,
Rectangle3D roi)
10/4/2012 intent is to run this through the parallel version
|
static int |
doOutsideRoiFill(boolean[][][] A,
Rectangle3D roi) |
static int |
doOutsideRoiFill(boolean[][] A,
java.awt.Rectangle roi) |
static int |
doOutsideRoiFill(byte[][][] A,
Rectangle3D roi,
byte fillval) |
static int |
doOutsideRoiFill(byte[][] A,
java.awt.Rectangle roi,
byte fillval) |
static int |
doOutsideRoiFill(short[][][] A,
Rectangle3D roi,
short fillval) |
static int |
doOutsideRoiFill(short[][] A,
java.awt.Rectangle roi,
short fillval) |
static int |
edgeFill(boolean[][] A)
WO boolean version 1/10/2012
Nearly always faster to first find bounding rect then process over only the Roi. |
static int |
edgeFill(boolean[][][] A)
WO 3/4/11 modified to run in // as sets of 2D edgefills
|
static int |
edgeFill(boolean[][][] A,
int conn3D) |
static int |
edgeFill(boolean[][][] A,
int sliceStart,
int sliceEnd)
WO 1/10/2012 boolean version does not include sliceEnd (< not <=)
note that this acts on each 2D slice independently (for //-ization) so not a true 3D fill. |
static int |
edgeFill(boolean[][][] A,
int sliceStart,
int sliceEnd,
int conn3D) |
static int |
edgeFill(boolean[][] A,
int conn) |
static int |
edgeFill(boolean[][] A,
java.awt.Rectangle rec) |
static int |
edgeFill(boolean[][] A,
java.awt.Rectangle rec,
int conn) |
static int |
edgeFill(byte[][] A) |
static int |
edgeFill(byte[][][] A)
WO 3/4/11 modified to run in //
|
static int |
edgeFill(byte[][][] A,
int conn) |
static int |
edgeFill(byte[][][] A,
int sliceStart,
int sliceEnd)
does not include sliceEnd (< not <=)
10/17/2013 want to comppute edgefill only over usable portion of image.
|
static int |
edgeFill(byte[][][] A,
int sliceStart,
int sliceEnd,
int conn3D) |
static int |
edgeFill(byte[][] A,
int conn) |
static int |
edgeFill(byte[][] A,
java.awt.Rectangle rec) |
static int |
edgeFill(byte[][] A,
java.awt.Rectangle rec,
byte fillval,
int conn) |
static int |
edgeFill(short[][] A) |
static int |
edgeFill(short[][] A,
int conn) |
static int |
edgeFill(short[][] A,
java.awt.Rectangle rec) |
static int |
edgeFill(short[][] A,
java.awt.Rectangle rec,
short fillval,
int conn) |
static int |
edgeFill3D(boolean[][][] A)
WO 9/26/2012 true 3D version
|
static int |
edgeFill3D(boolean[][][] A,
Rectangle3D roi,
int conn) |
static int |
edgeFill3D(byte[][][] A) |
static int |
edgeFill3D(byte[][][] A,
int conn) |
static int |
edgeFill3D(byte[][][] A,
Rectangle3D roi,
byte fillval,
int conn) |
static int |
edgeFill3D(short[][][] A) |
static int |
edgeFill3D(short[][][] A,
Rectangle3D roi,
short fillval,
int conn) |
static byte[][] |
edgeFinder(byte[][] A) |
static byte[][][] |
edgeFinder(byte[][][] A) |
static byte[][] |
edgeFinder(float[][] A) |
static byte[][][] |
edgeFinder(float[][][] A) |
static byte[][] |
edgeFinder(short[][] A) |
static byte[][][] |
edgeFinder(short[][][] A) |
static void |
edgeFinderReplaceA(byte[][] A)
edge finding algo: threshold; open; close; fill outside; gradient
|
static void |
edgeFinderReplaceA(byte[][][] A) |
static boolean[][][] |
erode(boolean[][][] A,
float searchRad) |
static boolean[][][] |
erode(boolean[][][] A,
float searchRad,
float zscale) |
static boolean[][][] |
erode(boolean[][][] A,
float searchRad,
float zscale,
boolean[][][] edgePts)
WO 7/3/2012 version where you pass in all the points at the edge that matter for eroding
|
static boolean[][][] |
erode(boolean[][][] A,
float searchRad,
float zscale,
Rectangle3D roi)
WO 10/3/2012 parallel version.
|
static boolean[][][] |
erode(boolean[][][] A,
float searchRad,
Rectangle3D roi) |
static boolean[][][] |
erode(boolean[][][] A,
int searchRad) |
static boolean[][][] |
erode(boolean[][][] A,
int searchRad,
float zscale) |
static boolean[][][] |
erode(boolean[][][] A,
int searchRad,
float zscale,
Rectangle3D roi)
10/19/11 WO in 2004 had problem of wrap-around in slice(Z) direction.
|
static boolean[][][] |
erode(boolean[][][] A,
int searchRad,
Rectangle3D roi) |
static boolean[][] |
erode(boolean[][] A,
float searchRad) |
static boolean[][] |
erode(boolean[][] A,
float searchRad,
java.awt.Rectangle roi) |
static boolean[][] |
erode(boolean[][] A,
int searchRad) |
static boolean[][] |
erode(boolean[][] A,
int searchRad,
java.awt.Rectangle roi) |
static byte[][][] |
erode(byte[][][] A,
float searchRad) |
static byte[][][] |
erode(byte[][][] A,
float searchRad,
float zscale) |
static byte[][][] |
erode(byte[][][] A,
float searchRad,
float zscale,
Rectangle3D roi) |
static byte[][][] |
erode(byte[][][] A,
float searchRad,
Rectangle3D roi) |
static byte[][][] |
erode(byte[][][] A,
int searchRad) |
static byte[][][] |
erode(byte[][][] A,
int searchRad,
float zscale) |
static byte[][][] |
erode(byte[][][] A,
int searchRad,
float zscale,
Rectangle3D roi)
10/19/11 WO in 2004 had problem of wrap-around in slice(Z) direction.
|
static byte[][][] |
erode(byte[][][] A,
int searchRad,
Rectangle3D roi) |
static byte[][] |
erode(byte[][] A,
float searchRad) |
static byte[][] |
erode(byte[][] A,
float searchRad,
java.awt.Rectangle roi) |
static byte[][] |
erode(byte[][] A,
int searchRad)
erosion: turn OFF if any pixels in region are OFF
|
static byte[][] |
erode(byte[][] A,
int searchRad,
java.awt.Rectangle roi) |
static byte[][][] |
erodeGray(byte[][][] A,
boolean[][] mask) |
static byte[][] |
erodeGray(byte[][] A,
boolean[][] mask) |
static short[][][] |
erodeGray(short[][][] A,
boolean[][] mask) |
static short[][] |
erodeGray(short[][] A,
boolean[][] mask) |
static float[][][][] |
fastApproxNCCC(short[][][] pixels,
float[][][][] kernels)
WO 1/4/11 fast but approximate NCCC calc based on Matlab's normxcorr3
assumes all the kernals in this stack are the same size. |
static boolean[][][] |
fastMarching(byte[][][] A,
int seedx,
int seedy,
int seedz,
int minthresh,
int deltaMax,
int maxNumberVoxels)
WO 5/18/2012 difference between fast marching and floodfill(=region growing) is fast marching
computes a threshold for inclusion on the fly, and keeps track of the wavefront location.
|
static boolean[][][] |
fastMarching(short[][][] A,
int seedx,
int seedy,
int seedz,
int minthresh,
int deltaMax,
int maxNumberVoxels) |
static float |
fastNMI(short[][][] A,
short[][][] B,
int[] ahisto,
int[] bhisto,
double bentropy,
int az,
int ax,
int ay) |
static float |
fastNMI(short[][][] A,
short[][][] B,
int az,
int ax,
int ay) |
static short[][] |
fillInTransformedHoles(short[][] A)
idea is that in the transformation step above some pixels in defTransImg may not
be mapped to a pixel in the original image and will have a value of '-1' (or -1042)
this flag is used in the calculation of NCC nad NMI, however you can use this
function to clean up the image for a pretty picture.
|
static short[][][] |
fillInTransformedHoles(short[][][] A)
idea is that in the transformation step above some pixels in defTransImg may not
be mapped to a pixel in the original image and will have a value of '-1' (or -1042)
this flag is used in the calculation of NCC nad NMI, however you can use this
function to clean up the image for a pretty picture.
|
static byte[][] |
fillOuterContour(byte[][] image,
Polygon2D outerCon)
WO 12/7/09 want binary image of area inside and including contour
|
static Point3D |
findfastNMImax(short[][][] A,
short[][][] B) |
static Point3D |
findfastNMImax(short[][][] A,
short[][][] B,
int az,
int ax,
int ay) |
static Point3D |
findNMImax(short[][][] A,
short[][][] B,
int az,
int ax,
int ay)
find max NMI point, given the starting location (az,ax,ay) -- thus is doing a minor attempt at registration
assume monotonic neighborhood |
static int[] |
findOptKmeansBinsStarts(int[] ahisto,
int nbins)
returns binCentroids (!= bin centers -- allow for nonsymmetric bins)
|
static int |
floodFill(boolean[][][] A,
int seedx,
int seedy,
int seedz)
7/31/2012 boolean 3D version.
|
static int |
floodFill(boolean[][][] A,
int seedx,
int seedy,
int seedz,
boolean displayWarnings) |
static int |
floodFill(boolean[][][] A,
int seedx,
int seedy,
int seedz,
int connectivity) |
static int |
floodFill(boolean[][][] A,
int seedx,
int seedy,
int seedz,
int connectivity,
boolean displayWarnings) |
static int |
floodFill(boolean[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi) |
static int |
floodFill(boolean[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
boolean displayWarnings) |
static int |
floodFill(boolean[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
int connectivity) |
static int |
floodFill(boolean[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
int connectivity,
boolean displayWarnings)
WO 4/15/08 passing fillval of 0 interpreted as flag to do labeled version
|
static int |
floodFill(boolean[][] A,
int seedx,
int seedy)
fill image starting from seed point.
|
static int |
floodFill(boolean[][] A,
int seedx,
int seedy,
int conn) |
static int |
floodFill(boolean[][] A,
int seedx,
int seedy,
java.awt.Rectangle roi) |
static int |
floodFill(boolean[][] A,
int seedx,
int seedy,
java.awt.Rectangle roi,
int conn) |
static int |
floodFill(byte[][][] A,
int seedx,
int seedy,
int seedz)
This is equivalent to seeded region growing but where the fill occurs
only to zero-valued pixels.
|
static int |
floodFill(byte[][][] A,
int seedx,
int seedy,
int seedz,
byte fillval) |
static int |
floodFill(byte[][][] A,
int seedx,
int seedy,
int seedz,
byte fillval,
float zscale) |
static int |
floodFill(byte[][][] A,
int seedx,
int seedy,
int seedz,
byte fillval,
int conn) |
static int |
floodFill(byte[][][] A,
int seedx,
int seedy,
int seedz,
byte fillval,
int conn,
float zscale) |
static int |
floodFill(byte[][][] A,
int seedx,
int seedy,
int seedz,
float zscale) |
static int |
floodFill(byte[][][] A,
int seedx,
int seedy,
int seedz,
int conn) |
static int |
floodFill(byte[][][] A,
int seedx,
int seedy,
int seedz,
int conn,
float zscale) |
static int |
floodFill(byte[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi) |
static int |
floodFill(byte[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
byte fillval) |
static int |
floodFill(byte[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
byte fillval,
float zscale) |
static int |
floodFill(byte[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
byte fillval,
int connectivity)
WO 4/15/08 passing fillval of 0 interpreted as flag to do labeled version
|
static int |
floodFill(byte[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
byte fillval,
int connectivity,
float zscale)
WO 4/15/08 passing fillval of 0 interpreted as flag to do labeled version
|
static int |
floodFill(byte[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
float zscale) |
static int |
floodFill(byte[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
int conn) |
static int |
floodFill(byte[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
int conn,
float zscale) |
static int |
floodFill(byte[][] A,
int seedx,
int seedy)
WO the original, byte version
|
static int |
floodFill(byte[][] A,
int seedx,
int seedy,
byte fillval) |
static int |
floodFill(byte[][] A,
int seedx,
int seedy,
int conn) |
static int |
floodFill(byte[][] A,
int seedx,
int seedy,
java.awt.Rectangle roi) |
static int |
floodFill(byte[][] A,
int seedx,
int seedy,
java.awt.Rectangle roi,
byte fillval,
int conn) |
static int |
floodFill(byte[][] A,
int seedx,
int seedy,
java.awt.Rectangle roi,
int conn) |
static int |
floodFill(short[][][] A,
int seedx,
int seedy,
int seedz) |
static int |
floodFill(short[][][] A,
int seedx,
int seedy,
int seedz,
float zscale) |
static int |
floodFill(short[][][] A,
int seedx,
int seedy,
int seedz,
int conn) |
static int |
floodFill(short[][][] A,
int seedx,
int seedy,
int seedz,
int conn,
float zscale) |
static int |
floodFill(short[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi) |
static int |
floodFill(short[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
float zscale) |
static int |
floodFill(short[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
int conn) |
static int |
floodFill(short[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
int conn,
float zscale) |
static int |
floodFill(short[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
short fillval) |
static int |
floodFill(short[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
short fillval,
float zscale) |
static int |
floodFill(short[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
short fillval,
int connectivity)
WO 4/15/08 passing fillval of 0 interpreted as flag to do labeled version
|
static int |
floodFill(short[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
short fillval,
int connectivity,
float zscale)
This is equivalent to seeded region growing but where the fill occurs only to zero-valued pixels.
|
static int |
floodFill(short[][][] A,
int seedx,
int seedy,
int seedz,
short fillval) |
static int |
floodFill(short[][][] A,
int seedx,
int seedy,
int seedz,
short fillval,
float zscale) |
static int |
floodFill(short[][][] A,
int seedx,
int seedy,
int seedz,
short fillval,
int conn) |
static int |
floodFill(short[][][] A,
int seedx,
int seedy,
int seedz,
short fillval,
int conn,
float zscale) |
static int |
floodFill(short[][] A,
int seedx,
int seedy) |
static int |
floodFill(short[][] A,
int seedx,
int seedy,
int conn) |
static int |
floodFill(short[][] A,
int seedx,
int seedy,
java.awt.Rectangle roi) |
static int |
floodFill(short[][] A,
int seedx,
int seedy,
java.awt.Rectangle roi,
int conn) |
static int |
floodFill(short[][] A,
int seedx,
int seedy,
java.awt.Rectangle roi,
short fillval,
int conn) |
static int |
floodFill(short[][] A,
int seedx,
int seedy,
short fillval) |
static void |
floodFillDownward(byte[][][] A,
int seedx,
int seedy,
int seedz)
WO 8/26/11 goal to pre-process downward flood fill set to avoid linking downward when there
is only a single pixel connection in neighborhood, to omit bowels from lung segmentation.
|
static void |
floodFillInitialDownward(short[][][] A,
int seedx,
int seedy,
int seedz,
short fillval,
float zscale) |
static void |
floodFillInitialUpward(byte[][][] A,
int seedx,
int seedy,
int seedz,
byte fillval,
float zscale)
WO 11/27/2015 goal to initially flood only upward to avoid things like the LV/RV from the aortic root, but allow the
fill to eventually go downward (i.e.
|
static void |
floodFillInitialUpward(short[][][] A,
int seedx,
int seedy,
int seedz,
short fillval,
float zscale) |
static int |
floodFillNlabel(byte[][][] A,
int seedx,
int seedy,
int seedz,
int connectivity)
WO 4/10/08 same as above except add parameter counting the flood layers and use as fillvalue
|
static int |
floodFillNlabel(byte[][][] A,
int seedx,
int seedy,
int seedz,
Rectangle3D roi,
int connectivity) |
static float |
getBinVariability(int[] histo,
float[] binCentroids,
int binAt) |
static java.awt.Rectangle |
getBoundingBox(boolean[][] A)
find boundaries of usable image
|
static Rectangle3D |
getBoundingBox(boolean[][][] A) |
static Rectangle3D |
getBoundingBox(boolean[][][] A,
int buffer) |
static Rectangle3D |
getBoundingBox(boolean[][][] A,
int buffer,
float zscale) |
static java.awt.Rectangle |
getBoundingBox(boolean[][] A,
int buffer) |
static java.awt.Rectangle |
getBoundingBox(byte[][] A) |
static Rectangle3D |
getBoundingBox(byte[][][] A) |
static Rectangle3D |
getBoundingBox(byte[][][] A,
int buffer) |
static Rectangle3D |
getBoundingBox(byte[][][] A,
int buffer,
float zscale) |
static Rectangle3D |
getBoundingBox(byte[][][] A,
int buffer,
float zscale,
int thresh) |
static java.awt.Rectangle |
getBoundingBox(byte[][] A,
int buffer) |
static java.awt.Rectangle |
getBoundingBox(float[][] A) |
static java.awt.Rectangle |
getBoundingBox(float[][] A,
int buffer) |
static java.awt.Rectangle |
getBoundingBox(Point3D[][] A) |
static java.awt.Rectangle |
getBoundingBox(Point3D[][] A,
int buffer) |
static java.awt.Rectangle |
getBoundingBox(short[][] A) |
static Rectangle3D |
getBoundingBox(short[][][] A) |
static Rectangle3D |
getBoundingBox(short[][][] A,
int buffer) |
static Rectangle3D |
getBoundingBox(short[][][] A,
int buffer,
float zscale) |
static Rectangle3D |
getBoundingBox(short[][][] A,
int buffer,
float zscale,
int thresh) |
static java.awt.Rectangle |
getBoundingBox(short[][] A,
int buffer) |
static java.awt.Rectangle |
getBoundingBox(short[][] A,
int buffer,
int thresh) |
static boolean[][][] |
getCurrentImageMatrix(boolean[][][] gettypeofA)
Looks at the current highlighted window with an image and ROI
and gets the dimensions and the image data into a 3d array
option to use Roi to define image being retrieved
gets image matrix as [depth][width][height] |
static boolean[][][] |
getCurrentImageMatrix(boolean[][][] gettypeofA,
boolean useRoi,
ij.ImagePlus imp) |
static boolean[][][] |
getCurrentImageMatrix(boolean[][][] gettypeofA,
ij.ImagePlus imp) |
static byte[][] |
getCurrentImageMatrix(byte[][] gettypeofA) |
static byte[][][] |
getCurrentImageMatrix(byte[][][] gettypeofA) |
static byte[][][] |
getCurrentImageMatrix(byte[][][] gettypeofA,
boolean useRoi) |
static byte[][][] |
getCurrentImageMatrix(byte[][][] gettypeofA,
boolean useRoi,
ij.ImagePlus imp) |
static byte[][][] |
getCurrentImageMatrix(byte[][][] gettypeofA,
ij.ImagePlus imp) |
static byte[][] |
getCurrentImageMatrix(byte[][] gettypeofA,
boolean useRoi) |
static float[][] |
getCurrentImageMatrix(float[][] gettypeofA) |
static float[][][] |
getCurrentImageMatrix(float[][][] gettypeofA) |
static float[][][] |
getCurrentImageMatrix(float[][][] gettypeofA,
boolean useRoi,
ij.ImagePlus imp) |
static float[][] |
getCurrentImageMatrix(float[][] gettypeofA,
boolean useRoi) |
static int[][] |
getCurrentImageMatrix(int[][] gettypeofA) |
static int[][][] |
getCurrentImageMatrix(int[][][] gettypeofA) |
static int[][][] |
getCurrentImageMatrix(int[][][] gettypeofA,
boolean useRoi) |
static int[][] |
getCurrentImageMatrix(int[][] gettypeofA,
boolean useRoi) |
static short[][] |
getCurrentImageMatrix(short[][] gettypeofA) |
static short[][][] |
getCurrentImageMatrix(short[][][] gettypeofA) |
static short[][][] |
getCurrentImageMatrix(short[][][] gettypeofA,
boolean useRoi) |
static short[][][] |
getCurrentImageMatrix(short[][][] gettypeofA,
boolean useRoi,
ij.ImagePlus imp) |
static short[][][] |
getCurrentImageMatrix(short[][][] gettypeofA,
ij.ImagePlus imp) |
static short[][] |
getCurrentImageMatrix(short[][] gettypeofA,
boolean useRoi) |
static boolean[][][] |
getEdgeImage(boolean[][][] origBinImg) |
static boolean[][][] |
getEdgeImage(boolean[][][] origBinImg,
boolean use27connections)
27 connections includes corners.
|
static float[] |
getEquiBins(int[] ahisto,
int nbins)
returns array of bin starts[Nbins+1] where last element is end of array.
|
static float |
getFarthestOnPtDist(boolean[][][] A,
int cenx,
int ceny,
int cenz,
float zscale) |
static float |
getFarthestOnPtDist(byte[][][] A,
int cenx,
int ceny,
int cenz,
int thresh,
float zscale) |
static float |
getFarthestOnPtDist(short[][][] A,
int cenx,
int ceny,
int cenz,
int thresh,
float zscale) |
static int[] |
getHistogram(byte[] A) |
static int[] |
getHistogram(byte[][] A) |
static int[] |
getHistogram(byte[][][] A) |
static int[] |
getHistogram(ij.ImagePlus imp,
int nbins) |
static int[] |
getHistogram(short[] A)
essentially scales image 0..255 then does histo analysis
|
static int[] |
getHistogram(short[][] A) |
static int[] |
getHistogram(short[][][] A) |
static int[] |
getHistogram(short[][][] A,
int nbins) |
static int[][] |
getHistogram(short[][][] A,
short[][][] B)
2D histogram
|
static int[][] |
getHistogram(short[][][] A,
short[][][] B,
int az,
int ax,
int ay)
get histogram in overlap region with center of B over pt (az,ax,ay) in A
|
static int[] |
getHistogram(short[][] A,
int nbins) |
static Point3D[][][] |
getImage3Dcoords(short[][][] img,
java.util.Properties[] DicomHeaders) |
static java.lang.String |
getImageJDataDir() |
static java.lang.String |
getImageJOutputDir() |
static java.lang.String |
getImageJOutputDir(ij.io.FileInfo thisfi) |
static float[] |
getKmeansBins(int[] ahisto,
int nbins)
classic method bins pixels to nearest bin centers,.
|
static float[] |
getKmeansBins(int[] ahisto,
int nbins,
java.lang.String initType) |
static float[] |
getKmeansBinsWO(int[] ahisto,
int nbins)
my version shifted bin sides around to min variance
|
static float[] |
getKmeansBinsWO(int[] ahisto,
int nbins,
java.lang.String initType) |
static boolean[][][] |
getMediastinumMask(boolean[][][] hemiLungMasks) |
static byte[][] |
getMIPslice(byte[][][] A,
float zscale,
float phi,
float theta,
float psi)
rotation around the original coordinate system.
|
static byte[][] |
getMIPslice(byte[][][] A,
float zscale,
float phi,
float theta,
float psi,
boolean scaleByZ) |
static byte[][] |
getMIPslice(byte[][][] A,
float zscale,
float phi,
float theta,
float psi,
int clipZminPct,
int clipZmaxPct) |
static byte[][] |
getMIPslice(byte[][][] A,
float zscale,
float phi,
float theta,
float psi,
int clipZminPct,
int clipZmaxPct,
boolean scaleByZ,
int resolutionFlag,
int BGthresh,
boolean doFast) |
static byte[][] |
getMIPslice(byte[][][] A,
float zscale,
float phi,
float theta,
float psi,
int cenx,
int ceny,
int cenz,
float objectZoom,
int clipZminPct,
int clipZmaxPct,
boolean scaleByZ,
int resolutionFlag,
int BGthresh,
boolean doFast) |
static short[][] |
getMIPslice(short[][][] A,
float zscale,
float phi,
float theta,
float psi)
get projection data at one projection slice, given by theta (rot about original Yaxis=vertical) and
phi (rot about original Xaxis=horizontal)
|
static short[][] |
getMIPslice(short[][][] A,
float zscale,
float phi,
float theta,
float psi,
boolean scaleByZ) |
static short[][] |
getMIPslice(short[][][] A,
float zscale,
float phi,
float theta,
float psi,
int clipZminPct,
int clipZmaxPct,
boolean scaleByZ,
int resolutionFlag,
int BGthresh,
boolean doFast) |
static short[][] |
getMIPslice(short[][][] A,
float zscale,
float phi,
float theta,
float psi,
int cenx,
int ceny,
int cenz,
float objectZoom,
int clipZminPct,
int clipZmaxPct,
boolean scaleByZ,
int resolutionFlag,
int BGthresh,
boolean doFast) |
static byte[][] |
getMIPsliceIncr(byte[][][] A,
float zscale,
float incrphi,
float incrtheta)
WO 8/13/2012 add feature to scale output pixel intensity by z value -- to give depth appearance
to boolean data (of skeletonized vessels)
Uses global miprot[][] to keep track of previous rotations.
|
static byte[][] |
getMIPsliceIncr(byte[][][] A,
float zscale,
float incrphi,
float incrtheta,
boolean doFast) |
static byte[][] |
getMIPsliceIncr(byte[][][] A,
float zscale,
float incrphi,
float incrtheta,
int clipZminPct,
int clipZmaxPct,
boolean doFast) |
static byte[][] |
getMIPsliceIncr(byte[][][] A,
float zscale,
float incrphi,
float incrtheta,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean isBinary,
int resolutionFlag,
int BGthresh) |
static byte[][] |
getMIPsliceIncr(byte[][][] A,
float zscale,
float incrphi,
float incrtheta,
int cenx,
int ceny,
int cenz,
float objectZoom,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean isBinary,
int resolutionFlag,
int BGthresh) |
static short[][] |
getMIPsliceIncr(short[][][] A,
float zscale,
float incrphi,
float incrtheta)
Uses global miprot[][] to keep track of previous rotations.
|
static short[][] |
getMIPsliceIncr(short[][][] A,
float zscale,
float incrphi,
float incrtheta,
boolean doFast) |
static short[][] |
getMIPsliceIncr(short[][][] A,
float zscale,
float incrphi,
float incrtheta,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean scaleByZ,
int resolutionFlag,
int BGthresh) |
static short[][] |
getMIPsliceIncr(short[][][] A,
float zscale,
float incrphi,
float incrtheta,
int cenx,
int ceny,
int cenz,
float objectZoom,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean scaleByZ,
int resolutionFlag,
int BGthresh) |
static short[][] |
getMIPsliceIncr(short[][][] A,
ImgProc.MIPcalcStruc M,
float zscale,
float incrphi,
float incrtheta) |
static short[][] |
getMIPsliceIncr(short[][][] A,
ImgProc.MIPcalcStruc M,
float zscale,
float incrphi,
float incrtheta,
boolean doFast) |
static short[][] |
getMIPsliceIncr(short[][][] A,
ImgProc.MIPcalcStruc M,
float zscale,
float incrphi,
float incrtheta,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean scaleByZ,
int resolutionFlag,
int BGthresh) |
static short[][] |
getMIPsliceIncr(short[][][] A,
ImgProc.MIPcalcStruc M,
float zscale,
int cenx,
int ceny,
int cenz,
float objectZoom,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean scaleByZ,
int resolutionFlag,
int BGthresh) |
static byte[][][] |
getMIPsliceIncrLabeled(byte[][][] A,
float zscale,
float incrphi,
float incrtheta,
boolean doFast,
byte[][][] Labels) |
static byte[][][] |
getMIPsliceIncrLabeled(byte[][][] A,
float zscale,
float incrphi,
float incrtheta,
byte[][][] Labels)
WO 8/13/2012 add feature to scale output pixel intensity by z value -- to give depth appearance
to boolean data (of skeletonized vessels)
|
static byte[][][] |
getMIPsliceIncrLabeled(byte[][][] A,
float zscale,
float incrphi,
float incrtheta,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean isBinary,
byte[][][] Labels) |
static byte[][][] |
getMIPsliceIncrLabeled(byte[][][] A,
float zscale,
float incrphi,
float incrtheta,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean isBinary,
byte[][][] Labels,
int resolutionFlag,
int BGthresh) |
static byte[][][] |
getMIPsliceIncrLabeled(byte[][][] A,
float zscale,
float incrphi,
float incrtheta,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
byte[][][] Labels) |
static byte[][][] |
getMIPsliceIncrLabeled(byte[][][] A,
float zscale,
float incrphi,
float incrtheta,
int cenx,
int ceny,
int cenz,
float objectZoom,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean isBinary,
byte[][][] Labels,
int resolutionFlag,
int BGthresh) |
static short[][][] |
getMIPsliceIncrLabeled(short[][][] A,
float zscale,
float incrphi,
float incrtheta,
boolean doFast,
byte[][][] Labels) |
static short[][][] |
getMIPsliceIncrLabeled(short[][][] A,
float zscale,
float incrphi,
float incrtheta,
byte[][][] Labels) |
static short[][][] |
getMIPsliceIncrLabeled(short[][][] A,
float zscale,
float incrphi,
float incrtheta,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean scaleByZ,
byte[][][] Labels) |
static short[][][] |
getMIPsliceIncrLabeled(short[][][] A,
float zscale,
float incrphi,
float incrtheta,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean scaleByZ,
byte[][][] Labels,
int resolutionFlag,
int BGthresh) |
static short[][][] |
getMIPsliceIncrLabeled(short[][][] A,
float zscale,
float incrphi,
float incrtheta,
int cenx,
int ceny,
int cenz,
float objectZoom,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean scaleByZ,
byte[][][] Labels,
int resolutionFlag,
int BGthresh) |
static byte[][][] |
getMIPsliceLabeled(byte[][][] A,
float zscale,
float phi,
float theta,
byte[][][] Labels)
WO 12/18/2012 want to return an image that can be colorized.
|
static byte[][][] |
getMIPsliceLabeled(byte[][][] A,
float zscale,
float phi,
float theta,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean scaleByZ,
byte[][][] Labels) |
static byte[][][] |
getMIPsliceLabeled(byte[][][] A,
float zscale,
float phi,
float theta,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean scaleByZ,
byte[][][] Labels,
int BGthresh) |
static byte[][][] |
getMIPsliceLabeled(byte[][][] A,
float zscale,
float phi,
float theta,
int clipZminPct,
int clipZmaxPct,
byte[][][] Labels) |
static byte[][][] |
getMIPsliceLabeled(byte[][][] A,
float zscale,
float phi,
float theta,
int cenx,
int ceny,
int cenz,
float objectZoom,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean scaleByZ,
byte[][][] Labels,
int BGthresh) |
static short[][][] |
getMIPsliceLabeled(short[][][] A,
float zscale,
float phi,
float theta,
byte[][][] Labels) |
static short[][][] |
getMIPsliceLabeled(short[][][] A,
float zscale,
float phi,
float theta,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean scaleByZ,
byte[][][] Labels) |
static short[][][] |
getMIPsliceLabeled(short[][][] A,
float zscale,
float phi,
float theta,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean scaleByZ,
byte[][][] Labels,
int BGthresh) |
static short[][][] |
getMIPsliceLabeled(short[][][] A,
float zscale,
float phi,
float theta,
int clipZminPct,
int clipZmaxPct,
byte[][][] Labels) |
static short[][][] |
getMIPsliceLabeled(short[][][] A,
float zscale,
float phi,
float theta,
int cenx,
int ceny,
int cenz,
float objectZoom,
int clipZminPct,
int clipZmaxPct,
boolean doFast,
boolean scaleByZ,
byte[][][] Labels,
int BGthresh) |
static float[] |
getNormalThroughEdgePt(boolean[][][] edgeMap,
int ptAtx,
int ptAty,
int ptAtz,
int searchrad) |
static float[] |
getNormalThroughEdgePt(boolean[][][] edgeMap,
Point3Dint ptAt,
int searchrad) |
static Rectangle3D |
getObjectBoundingBox(byte[][][] image,
int seedx,
int seedy,
int seedz)
WO 12/22/10 get bounding box for the object connected to pointinside within the thresholded (binary) image
|
static Rectangle3D |
getObjectBoundingBox(byte[][][] image,
int seedx,
int seedy,
int seedz,
int pixelbuffer) |
static Polygon3D |
getObjectContour(byte[][][] image,
int seedd,
int seedw,
int seedh)
WO 2/14/11 assume that the image is basically a mask such that the pixel value at
the seed demarks the object from the surroundings and the value will be either 0, 255 or 128
|
static Polygon2D |
getOuterContour(boolean[][] image)
routines to automatically detect outer surface contour
Short assumes the image center is inside ROI and walks out from center Byte works with roi, if none found uses bounding box. |
static Polygon2D[] |
getOuterContour(boolean[][][] image) |
static Polygon2D[] |
getOuterContour(boolean[][][] image,
java.awt.Rectangle roi) |
static Polygon2D |
getOuterContour(boolean[][] image,
java.awt.Rectangle roi) |
static Polygon2D |
getOuterContour(byte[][] image) |
static Polygon2D[] |
getOuterContour(byte[][][] image) |
static Polygon2D[] |
getOuterContour(byte[][][] image,
java.awt.Rectangle roi) |
static Polygon3D |
getOuterContour(byte[][][] image,
Rectangle3D roi)
WO 2/14/11 true 3D version
|
static Polygon2D |
getOuterContour(byte[][] image,
java.awt.Rectangle roi) |
static Polygon2D |
getOuterContour(short[][] image)
Short versions use Roi vs and 100 projection angles
|
static Polygon2D[] |
getOuterContour(short[][][] image) |
static Polygon2D[] |
getOuterContour(short[][][] image,
int thresh) |
static Polygon2D[] |
getOuterContour(short[][][] image,
int thresh,
int npts) |
static Polygon2D[] |
getOuterContour(short[][][] image,
int thresh,
int npts,
ij.gui.Roi roi) |
static Polygon2D |
getOuterContour(short[][] image,
int thresh) |
static Polygon2D |
getOuterContour(short[][] image,
int thresh,
int npts) |
static Polygon2D |
getOuterContour(short[][] image,
int thresh,
int npts,
ij.gui.Roi roi) |
static float[] |
getPixel3Dcoords(int pxdepth,
int pxwidth,
int pxheight,
Rectangle3D rect,
java.util.Properties[] DicomHeaders)
get 3D mm coords for pixel.
|
static Point3D[][][] |
getROI3Dcoords(short[][][] img,
Rectangle3D rect,
java.util.Properties[] DicomHeaders)
get 3D mm coords and pixel value of each pixel within the ROI rectangle.
|
static float[] |
getStackDepths(ij.ImagePlus imgs) |
static Point3D[][][] |
getTransformedImageCoords_mm(short[][][] img,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
float xshift,
float yshift,
float zshift,
float drot,
float wrot,
float hrot,
float dscale,
float wscale,
float hscale,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi) |
static Point3D[][][] |
getTransformedImageCoords_mm(short[][][] img,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
ImageRegistration imgreg,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi)
get 3D mm transformed coords and pixel value of each pixel within the ROI rectangle, using the same code as above.
|
static float[] |
getTransformedPtCoords_mm(float ptdepth,
float ptwidth,
float ptheight,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
float xshift,
float yshift,
float zshift,
float drot,
float wrot,
float hrot,
float dscale,
float wscale,
float hscale,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi) |
static float[] |
getTransformedPtCoords_mm(float ptdepth,
float ptwidth,
float ptheight,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
ImageRegistration imgreg,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi) |
static float[] |
getTransformedPtCoords_mm(int ptdepth,
int ptwidth,
int ptheight,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
float xshift,
float yshift,
float zshift,
float drot,
float wrot,
float hrot,
float dscale,
float wscale,
float hscale,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi) |
static float[] |
getTransformedPtCoords_mm(int ptdepth,
int ptwidth,
int ptheight,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
ImageRegistration imgreg,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi)
Intent is to pass in the image pixel coords d,w,h and transform them according to the existing registration
parameters to get the tranformed 3D point coords in mm in scanner coords of the target set.
|
static float[] |
getTransformedPtCoords_px(float ptdepth,
float ptwidth,
float ptheight,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
float xshift,
float yshift,
float zshift,
float drot,
float wrot,
float hrot,
float dscale,
float wscale,
float hscale,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi) |
static float[] |
getTransformedPtCoords_px(float ptdepth,
float ptwidth,
float ptheight,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
ImageRegistration imgreg,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi) |
static float[] |
getTransformedPtCoords_px(int ptdepth,
int ptwidth,
int ptheight,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
float xshift,
float yshift,
float zshift,
float drot,
float wrot,
float hrot,
float dscale,
float wscale,
float hscale,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi) |
static float[] |
getTransformedPtCoords_px(int ptdepth,
int ptwidth,
int ptheight,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
ImageRegistration imgreg,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi)
Intent is to pass in the image pixel coords d,w,h and transform them according to the existing registration
parameters to get the tranformed 3D pixel coords in (dwh) with sub-pixel precision in the scanner coords of the
target set.
|
static int[] |
getWHDdirs(java.lang.String DicomHeader) |
static float |
imageStatsCorrelation(byte[][][] A,
byte[][][] B)
WO 4/4/2013 want statistical correlation of 2 images evaluated only over the prescribed mask.
|
static float |
imageStatsCorrelation(byte[][][] A,
byte[][][] B,
boolean[][][] roiMask) |
static float |
imageStatsCorrelation(byte[][][] A,
byte[][][] B,
boolean[][][] roiMask,
Rectangle3D roi) |
static float |
imageStatsCorrelation(byte[][][] A,
byte[][][] B,
Rectangle3D roi) |
static float |
imageStatsCorrelation(byte[][] A,
byte[][] B,
boolean[][] roiMask) |
static float |
imageStatsCorrelation(short[][][] A,
byte[][][] B) |
static float |
imageStatsCorrelation(short[][][] A,
byte[][][] B,
boolean[][][] roiMask) |
static float |
imageStatsCorrelation(short[][][] A,
byte[][][] B,
boolean[][][] roiMask,
Rectangle3D roi) |
static float |
imageStatsCorrelation(short[][][] A,
byte[][][] B,
Rectangle3D roi) |
static float |
imageStatsCorrelation(short[][][] A,
short[][][] B) |
static float |
imageStatsCorrelation(short[][][] A,
short[][][] B,
boolean[][][] roiMask) |
static float |
imageStatsCorrelation(short[][][] A,
short[][][] B,
boolean[][][] roiMask,
Rectangle3D roi) |
static float |
imageStatsCorrelation(short[][][] A,
short[][][] B,
Rectangle3D roi) |
static float |
imageStatsCorrelation(short[][] A,
byte[][] B) |
static float |
imageStatsCorrelation(short[][] A,
byte[][] B,
boolean[][] roiMask) |
static float |
imageStatsCorrelation(short[][] A,
short[][] B,
boolean[][] roiMask) |
static float[][] |
invertGrayscale(float[][] A) |
static float[][][] |
invertGrayscale(float[][][] A) |
static short[][] |
invertGrayscale(short[][] A) |
static short[][][] |
invertGrayscale(short[][][] A) |
static float[] |
invTransformPt_px(float ptdepth,
float ptwidth,
float ptheight,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
float xshift,
float yshift,
float zshift,
float drot,
float wrot,
float hrot,
float dscale,
float wscale,
float hscale,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi) |
static float[] |
invTransformPt_px(float ptdepth,
float ptwidth,
float ptheight,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
ImageRegistration imgreg,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi) |
static float[] |
invTransformPt_px(int ptdepth,
int ptwidth,
int ptheight,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
float xshift,
float yshift,
float zshift,
float drot,
float wrot,
float hrot,
float dscale,
float wscale,
float hscale,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi) |
static float[] |
invTransformPt_px(int ptdepth,
int ptwidth,
int ptheight,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
ImageRegistration imgreg,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi)
Intent is to inverse-transform the voxel in the target image back to it's beginning voxel in the reference
image using the existing affine image registration values, and using a cheap iterative approach.
WO 4/25/20913 This seems to be working correctly. |
static boolean |
isByte(ij.ImagePlus imp) |
static boolean |
isColor(ij.ImagePlus imp) |
static boolean |
isDicom(ij.ImagePlus imp) |
static boolean[][][] |
makeSparse(boolean[][][] A,
float sparseSizeRad,
float dscale)
WO 8/15/2012 intent is to take a binary image with a high density of points and remove many adjacent
points, creating a more sparse version.
|
static double[][] |
neighborMult(int[][] A)
meant to weigh condense-ness in 2D histogram
|
static double[][] |
neighborProbMult(int[][] A) |
static float[][][] |
NMI(short[][][] A,
short[][][] B)
compute for each pixel in A image
WO: extend A-array with zeros to cover all part where B extends outside the A boundaries. |
static float |
NMI(short[][][] A,
short[][][] B,
int az,
int ax,
int ay)
compute mutual information index at A[az][ax][ay]
assume A&B are already scaled 0..255 |
static boolean[][][] |
openOp(boolean[][][] A,
float searchRad) |
static boolean[][][] |
openOp(boolean[][][] A,
float searchRad,
float zscale) |
static boolean[][][] |
openOp(boolean[][][] A,
float searchRad,
float zscale,
boolean[][][] edgePts) |
static boolean[][][] |
openOp(boolean[][][] A,
float searchRad,
float zscale,
Rectangle3D roi) |
static boolean[][][] |
openOp(boolean[][][] A,
float searchRad,
Rectangle3D roi) |
static boolean[][][] |
openOp(boolean[][][] A,
int searchRad) |
static boolean[][][] |
openOp(boolean[][][] A,
int searchRad,
float zscale) |
static boolean[][][] |
openOp(boolean[][][] A,
int searchRad,
float zscale,
Rectangle3D roi) |
static boolean[][][] |
openOp(boolean[][][] A,
int searchRad,
Rectangle3D roi) |
static boolean[][] |
openOp(boolean[][] A,
float searchRad) |
static boolean[][] |
openOp(boolean[][] A,
float searchRad,
java.awt.Rectangle roi) |
static boolean[][] |
openOp(boolean[][] A,
int searchRad) |
static boolean[][] |
openOp(boolean[][] A,
int searchRad,
java.awt.Rectangle roi) |
static byte[][][] |
openOp(byte[][][] A,
float searchRad) |
static byte[][][] |
openOp(byte[][][] A,
float searchRad,
float zscale) |
static byte[][][] |
openOp(byte[][][] A,
float searchRad,
float zscale,
Rectangle3D roi) |
static byte[][][] |
openOp(byte[][][] A,
float searchRad,
Rectangle3D roi) |
static byte[][][] |
openOp(byte[][][] A,
int searchRad) |
static byte[][][] |
openOp(byte[][][] A,
int searchRad,
float zscale) |
static byte[][][] |
openOp(byte[][][] A,
int searchRad,
float zscale,
Rectangle3D roi) |
static byte[][][] |
openOp(byte[][][] A,
int searchRad,
Rectangle3D roi) |
static byte[][] |
openOp(byte[][] A,
float searchRad) |
static byte[][] |
openOp(byte[][] A,
float searchRad,
java.awt.Rectangle roi) |
static byte[][] |
openOp(byte[][] A,
int searchRad)
binary image operation Open = dilate(erode(A))
|
static byte[][] |
openOp(byte[][] A,
int searchRad,
java.awt.Rectangle roi) |
static float[][][] |
pad(float[][][] K,
int ad,
int aw,
int ah)
pad array for fourier convolution operation
assume K is a kernel generated from gaussianKernel() or the like where the kernel center is at (kw/2, kh/2, kd/2), and kw,kh,kd are odd-valued in the padded version, the padded kernel is to be stored in 3D wrap-around and K.lengths < A.lengths |
static byte[][] |
readInImageFile(byte[][] imgtype,
java.lang.String path) |
static short[][] |
readInImageFile(short[][] imgtype,
java.lang.String path) |
static byte[][][] |
readInImageFiles(byte[][][] imgtype,
java.lang.String path,
java.lang.String[] orderedFilenames,
java.lang.String descr) |
static float[][][] |
readInImageFiles(float[][][] imgtype,
java.lang.String path,
java.lang.String[] orderedFilenames,
java.lang.String descr) |
static short[][][] |
readInImageFiles(short[][][] imgtype,
java.lang.String path,
java.lang.String[] orderedFilenames,
java.lang.String descr) |
static boolean[][][] |
readInMaskFiles(java.lang.String path,
java.lang.String[] orderedFilenames,
java.lang.String descr) |
static byte[][][] |
readInQueryImageFiles(byte[][][] imgtype,
java.lang.String path,
java.lang.String descr) |
static byte[][][] |
readInQueryImageFiles(byte[][][] imgtype,
java.lang.String path,
java.lang.String[] orderedFilenames,
java.lang.String descr) |
static float[][][] |
readInQueryImageFiles(float[][][] imgtype,
java.lang.String path,
java.lang.String descr) |
static float[][][] |
readInQueryImageFiles(float[][][] imgtype,
java.lang.String path,
java.lang.String[] orderedFilenames,
java.lang.String descr) |
static short[][][] |
readInQueryImageFiles(short[][][] imgtype,
java.lang.String path,
java.lang.String descr) |
static short[][][] |
readInQueryImageFiles(short[][][] imgtype,
java.lang.String path,
java.lang.String[] orderedFilenames,
java.lang.String descr) |
static boolean[][][] |
readInQueryMaskFiles(java.lang.String path,
java.lang.String[] orderedFilenames,
java.lang.String descr) |
static boolean[][][] |
removeMaskHoles(boolean[][][] A)
WO 12/21/2014 clean up mask to remove internal holes and edge noise.
|
static void |
reorderSlices(ij.ImagePlus imp,
int[] oi,
int sliceoffset)
WO 2/9/11 intent is to reorder slices by the ordered indices gained above
|
static void |
reorderSlices(ij.ImagePlus imp,
java.lang.String[] ofilenames,
int sliceoffset)
WO 2/7/2013 apparently I started coding this but never finished.
|
static void |
resetMipRot(float theta,
float phi) |
static byte[][] |
skeletonize(byte[][] origBinImg)
2D skeletonize function from BinaryProcessor
WO 7/2/2012 for true 3D use the skeletonize3D.java in WOmath/ |
static int[] |
sortBySliceLoc(ij.ImagePlus imp)
WO 2/2/11 returns the array of orderd indices
|
static int[] |
sortBySlicePosZ_Time(ij.ImagePlus imp)
WO 2/2/11 returns the array of orderd indices looking at DICOM Image Position Z coord
6/27/2012 added first test to looks for slice labels in Stack's lables array 11/11/2014 secondarily order by image number (for cine image stack). |
static int[] |
sortBySlicePosZ(ij.ImagePlus imp) |
static byte[][][] |
statsCorrCirc(short[][][] pixels,
float[][][][] kernels)
WO version set corr output size to match input image
also compute NCCC over circular (spherical) region rather than square (cube) because the cube accentuates far pixels at corners. |
static byte[][][] |
statsCorrCirc(short[][][] pixels,
float[][][][] kernels,
boolean[][][] mask)
WO version to use mask to speed up computation (which it does)
|
static byte[][][] |
statsCorrCirc(short[][][] pixels,
float[][][][] kernels,
boolean[][][] mask,
int sd,
int sw,
int sh,
int fd,
int fw,
int fh)
2/16/11 parallel threaded/processor version
|
static byte[][][] |
statsCorrCirc(short[][][] pixels,
float[][][][] kernels,
int sd,
int sw,
int sh,
int fd,
int fw,
int fh) |
static byte[][][] |
statsCorrCirc(short[][][] pixels,
float[][][] kernel,
boolean[][][] mask,
int sd,
int sw,
int sh,
int fd,
int fw,
int fh) |
static byte[][][] |
statsCorrCirc(short[][][] pixels,
float[][][] kernel,
int sd,
int sw,
int sh,
int fd,
int fw,
int fh) |
static float[][][] |
statsCorrelation(float[][][] pixels,
float[][][] kernel) |
static float[][][][] |
statsCorrelation(float[][][] pixels,
float[][][][] kernels)
PW, 04-01-2002 3D statistical correlation
WO 4/24/02 added ability to do multiple 3D kernels at once also, knock off the blank edge image elements (slices, columns and rows), thus resulting corrImage is smaller than original image This is designed to return the NCCC value computed at each pixel in the original image obtained by moving the kernel over the entire image |
static float[][] |
statsCorrelation(float[][] pixels,
float[][] kernel)
the statistical correlation coefficient is similar to image correlation, but
uses a few more comptuations and is better at finding image features
returns correlation image as 2D array indices of arrays as [depth][width][height] |
static byte[][][] |
statsCorrelation(int[][][] pixels,
float[][][] kernel) |
static byte[][][][] |
statsCorrelation(int[][][] pixels,
float[][][][] kernels)
WO 4/24/02 to do multiple 3D kernels at once, byte version
also, knock off the blank edge image elements (slices, columns and rows) |
static Point3D[] |
statsCorrelation(int[][][] pixels,
float[][][][] kernels,
Point3D[] cands) |
static Point3D[] |
statsCorrelation(int[][][] pixels,
float[][][] kernel,
Point3D[] cands) |
static byte[][] |
statsCorrelation(int[][] pixels,
float[][] kernel) |
static Point2D[] |
statsCorrelation(int[][] pixels,
float[][] kernel,
Point2D[] cands)
WO 5/14/02 version to compute corr only at candidates
|
static byte[][][][] |
statsCorrelation(short[][][] pixels,
float[][][][] kernels)
WO 4/24/02 to do multiple 3D kernels at once, short version but return byte in range 0..255
|
static Point3D[] |
statsCorrelation(short[][][] pixels,
float[][][][] kernels,
Point3D[] cands) |
static Point3Dint[] |
statsCorrelation(short[][][] pixels,
float[][][][] kernels,
Point3Dint[] cands)
using Point3Dint[]
|
static Point3D[] |
statsCorrelation(short[][][] pixels,
float[][][] kernel,
Point3D[] cands) |
static Point3Dint[] |
statsCorrelation(short[][][] pixels,
float[][][] kernel,
Point3Dint[] cands)
Point3Dint[] version
|
static Point2D[] |
statsCorrelation(short[][] pixels,
float[][] kernel,
Point2D[] cands)
WO 8/2/02 short version to compute corr only at candidates
|
static boolean[][][] |
subtractMasks(boolean[][][] A,
boolean[][][] B) |
static boolean[][] |
subtractMasks(boolean[][] A,
boolean[][] B)
if A[i][j] is False, result is False.
|
static void |
threshold(byte[][][] A,
int thresh) |
static void |
threshold(byte[][] A,
int thresh) |
static void |
threshold(float[][][] A,
float thresh) |
static void |
threshold(float[][] A,
float thresh) |
static void |
threshold(int[][][] A,
int thresh) |
static void |
threshold(int[][] A,
int thresh) |
static void |
threshold(short[][][] A,
int thresh) |
static void |
threshold(short[][][] A,
short thresh) |
static void |
threshold(short[][] A,
int thresh) |
static void |
threshold(short[][] A,
short thresh) |
static short[][][] |
transform(short[][][] img,
float dshift,
float wshift,
float hshift,
float drot,
float wrot,
float hrot,
Rectangle3D roi)
this is used by ArrayDisplay.overlapImage()
|
static short[][] |
transform(short[][] img,
float wshift,
float hshift,
float drot)
WO 12/17/09 2D version, but without ROI usage
|
static short[][][] |
transformImage_mm(short[][][] img,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
float xshift,
float yshift,
float zshift,
float drot,
float wrot,
float hrot,
float dscale,
float wscale,
float hscale,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi)
version that creates and returns the transformed Image.
WO 4/25/20913 This seems to be working correctly. |
static void |
transformImage_mm(short[][][] img,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
float xshift,
float yshift,
float zshift,
float drot,
float wrot,
float hrot,
float dscale,
float wscale,
float hscale,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi,
short[][][] transformedImage,
boolean useTriLinearInt)
version with resulting transformed Image as parameter for case when need to save memory upon multiple calls.
WO 4/25/20913 This seems to be working correctly. |
static short[][][] |
transformImage_mm(short[][][] img,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
float xshift,
float yshift,
float zshift,
float drot,
float wrot,
float hrot,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi) |
static void |
transformImage_mm(short[][][] img,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
float xshift,
float yshift,
float zshift,
float drot,
float wrot,
float hrot,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi,
short[][][] transformedImage) |
static short[][][] |
transformImage_mm(short[][][] img,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
ImageRegistration imgreg,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi)
version that creates and returns the transformed Image.
WO 4/25/20913 This seems to be working correctly. |
static void |
transformImage_mm(short[][][] img,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
ImageRegistration imgreg,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi,
short[][][] transformedImage) |
static void |
transformImage_mm(short[][][] img,
java.util.Properties[] selfHeaders,
Rectangle3D selfroi,
ImageRegistration imgreg,
java.util.Properties[] targetHeaders,
Rectangle3D targetroi,
short[][][] transformedImage,
boolean useTriLinearInt) |
static short[][] |
transformImage_mm(short[][] img,
java.util.Properties selfHeader,
float wshift,
float hshift,
float drot)
WO 3/10/09 These funcs transform the image w/r/2 its own 3D coord system and outputs it into the pixel
system of the target image.
|
static void |
writeImageFile(byte[][] singleImage,
java.lang.String path) |
static void |
writeImageFile(short[][] singleImage,
java.lang.String path) |
static void |
writeImageFiles(boolean[][][] imageArray,
java.lang.String path,
java.lang.String[] orderedFilenames,
java.lang.String extension) |
static void |
writeImageFiles(byte[][][] imageArray,
java.lang.String path,
java.lang.String[] orderedFilenames,
java.lang.String extension) |
static void |
writeImageFiles(short[][][] imageArray,
java.lang.String path,
java.lang.String[] orderedFilenames,
java.lang.String extension) |
public static java.lang.String getImageJOutputDir()
public static java.lang.String getImageJOutputDir(ij.io.FileInfo thisfi)
public static byte[][] readInImageFile(byte[][] imgtype, java.lang.String path)
public static short[][] readInImageFile(short[][] imgtype, java.lang.String path)
public static void writeImageFile(byte[][] singleImage, java.lang.String path)
public static void writeImageFile(short[][] singleImage, java.lang.String path)
public static void writeImageFiles(boolean[][][] imageArray, java.lang.String path, java.lang.String[] orderedFilenames, java.lang.String extension)
public static void writeImageFiles(byte[][][] imageArray, java.lang.String path, java.lang.String[] orderedFilenames, java.lang.String extension)
public static void writeImageFiles(short[][][] imageArray, java.lang.String path, java.lang.String[] orderedFilenames, java.lang.String extension)
public static boolean[][][] readInMaskFiles(java.lang.String path, java.lang.String[] orderedFilenames, java.lang.String descr)
public static byte[][][] readInImageFiles(byte[][][] imgtype, java.lang.String path, java.lang.String[] orderedFilenames, java.lang.String descr)
public static short[][][] readInImageFiles(short[][][] imgtype, java.lang.String path, java.lang.String[] orderedFilenames, java.lang.String descr)
public static float[][][] readInImageFiles(float[][][] imgtype, java.lang.String path, java.lang.String[] orderedFilenames, java.lang.String descr)
public static boolean[][][] readInQueryMaskFiles(java.lang.String path, java.lang.String[] orderedFilenames, java.lang.String descr)
public static byte[][][] readInQueryImageFiles(byte[][][] imgtype, java.lang.String path, java.lang.String descr)
public static byte[][][] readInQueryImageFiles(byte[][][] imgtype, java.lang.String path, java.lang.String[] orderedFilenames, java.lang.String descr)
public static short[][][] readInQueryImageFiles(short[][][] imgtype, java.lang.String path, java.lang.String descr)
public static short[][][] readInQueryImageFiles(short[][][] imgtype, java.lang.String path, java.lang.String[] orderedFilenames, java.lang.String descr)
public static float[][][] readInQueryImageFiles(float[][][] imgtype, java.lang.String path, java.lang.String descr)
public static float[][][] readInQueryImageFiles(float[][][] imgtype, java.lang.String path, java.lang.String[] orderedFilenames, java.lang.String descr)
public static java.lang.String getImageJDataDir()
public static boolean isDicom(ij.ImagePlus imp)
public static boolean isByte(ij.ImagePlus imp)
public static boolean isColor(ij.ImagePlus imp)
public static void createDicomProps(ij.ImagePlus imp)
public static void createDicomProps(ij.ImagePlus imp, java.lang.String defaultDicomHeader)
public static void createDicomProps(ij.ImagePlus imp, float estScaleW, float estScaleH, float estScaleD)
public static void createDicomProps(ij.ImagePlus imp, float estScaleW, float estScaleH, float estScaleD, float xdir0, float xdir1, float xdir2, float ydir0, float ydir1, float ydir2)
public static void createDicomProps(ij.ImagePlus imp, java.lang.String defaultDicomHeader, float estScaleW, float estScaleH, float estScaleD, float xdir0, float xdir1, float xdir2, float ydir0, float ydir1, float ydir2)
public static Point3D[][][] getImage3Dcoords(short[][][] img, java.util.Properties[] DicomHeaders)
public static Point3D[][][] getROI3Dcoords(short[][][] img, Rectangle3D rect, java.util.Properties[] DicomHeaders)
img
- original image (needed only for pixel values in output)rect
- 3D rectangular roiDicomHeaders
- public static float[] getPixel3Dcoords(int pxdepth, int pxwidth, int pxheight, Rectangle3D rect, java.util.Properties[] DicomHeaders)
pxdepth,pxwidth,pxheight
- pixel coordsrect
- 3D rectangular roi, assuming the image whose pixel coords you want has been cropped.DicomHeaders
- assumes that if the image was cropped, so were the dicom headerspublic static int[] getWHDdirs(java.lang.String DicomHeader)
public static short[][] transformImage_mm(short[][] img, java.util.Properties selfHeader, float wshift, float hshift, float drot)
WO 5/1/09 if pixel not set returns a value of -1 (or -1042) for that pixel. This is needed for calculation of similarity where the code does not count '-1' pixels (used as flag)
WO 3/10/09 should the d,w,h-shift values be in mm or in pixels? If not using any rotations then do not need to be in 3D coords so shifts in terms of pixels would be faster and easier to work with, however it would be nice to know that we are always in either pixels vs mm, and it might be confusing to remember to convert from pixels to mm (only need to remember that here and in ImgRegistration.java). Rotations in degrees.
WO 11/5/2012 Until now the shifts were in Pixels, but now changing to mm to work in general case of possibly obliquely presecribed MR images and to ease use of shifting the 2 images sets by the top-left-corner coord To handle the case of the 2 scanners not having consistant origins (I have a patient with the 2nd scan approx. 2 meters offset from the first scan and transformation failing because they scans do not overlap).
WO 1/6/10 use fillInTransformedHoles() below to fill in the '-1' holes for a pretty picture
WO 1/5/10 2D in-plane transformation version. No roi passed in so assumes target and initial props and roi's are the same
public static short[][][] transformImage_mm(short[][][] img, java.util.Properties[] selfHeaders, Rectangle3D selfroi, ImageRegistration imgreg, java.util.Properties[] targetHeaders, Rectangle3D targetroi)
img
- cropped original image that will be transformed/warped into the output transformedImage.selfHeaders
- Properties for each slice of the original image that is being transformed. Used to convert from
units of pixels to mm in the original image space.selfroi
- Program assumes that the original image has been cropped as defined by selfroi. Used to convert
to mm in the cropped original scanner space.imgreg
- Defines the affine transformation to be used on the original image.targetHeaders
- Properties for each slice of the target space that original image is being transformed to.
Used to convert to units of mm in the target space, and eventually into pixels in the target space.targetroi
- Program assumes that the target image has been cropped as defined by targetroi. Used to
convert to mm and then pixels in the cropped target space.transformedImage
- The resultant, transformed image being returned to the parent program.useTrilinearInt
- Flag to use tri-linear interpolation vs nearest neighbor in final transformed image.public static void transformImage_mm(short[][][] img, java.util.Properties[] selfHeaders, Rectangle3D selfroi, ImageRegistration imgreg, java.util.Properties[] targetHeaders, Rectangle3D targetroi, short[][][] transformedImage)
public static void transformImage_mm(short[][][] img, java.util.Properties[] selfHeaders, Rectangle3D selfroi, ImageRegistration imgreg, java.util.Properties[] targetHeaders, Rectangle3D targetroi, short[][][] transformedImage, boolean useTriLinearInt)
public static short[][][] transformImage_mm(short[][][] img, java.util.Properties[] selfHeaders, Rectangle3D selfroi, float xshift, float yshift, float zshift, float drot, float wrot, float hrot, java.util.Properties[] targetHeaders, Rectangle3D targetroi)
public static short[][][] transformImage_mm(short[][][] img, java.util.Properties[] selfHeaders, Rectangle3D selfroi, float xshift, float yshift, float zshift, float drot, float wrot, float hrot, float dscale, float wscale, float hscale, java.util.Properties[] targetHeaders, Rectangle3D targetroi)
img
- cropped original image that will be transformed/warped into the output transformedImage.selfHeaders
- Properties for each slice of the original image that is being transformed. Used to convert from
units of pixels to mm in the original image space.selfroi
- Program assumes that the original image has been cropped as defined by selfroi. Used to convert to mm
in the cropped original scanner space.shifts,rots
- Define the affine transformation to be used on the original image.targetHeaders
- Properties for each slice of the target space that original image is being transformed to. Used to
convert to units of mm in the target space, and eventually into pixels in the target space.targetroi
- Program assumes that the target image has been cropped as defined by targetroi. Used to convert
to mm and then pixels in the cropped target space.transformedImage
- The resultant, transformed image being returned to the parent program.useTrilinearInt
- Flag to use tri-linear interpolation vs nearest neighbor in final transformed image.public static void transformImage_mm(short[][][] img, java.util.Properties[] selfHeaders, Rectangle3D selfroi, float xshift, float yshift, float zshift, float drot, float wrot, float hrot, java.util.Properties[] targetHeaders, Rectangle3D targetroi, short[][][] transformedImage)
public static void transformImage_mm(short[][][] img, java.util.Properties[] selfHeaders, Rectangle3D selfroi, float xshift, float yshift, float zshift, float drot, float wrot, float hrot, float dscale, float wscale, float hscale, java.util.Properties[] targetHeaders, Rectangle3D targetroi, short[][][] transformedImage, boolean useTriLinearInt)
img
- cropped original image that will be transformed/warped into the output transformedImage.selfHeaders
- Properties for each slice of the original image that is being transformed. Used to convert from
units of pixels to mm in the original image space.selfroi
- Program assumes that the original image has been cropped as defined by selfroi. Used to convert to mm
in the cropped original scanner space.shifts,rots,scales
- Define the affine transformation to be used on the original image.targetHeaders
- Properties for each slice of the target space that original image is being transformed to. Used to
convert to units of mm in the target space, and eventually into pixels in the target space.targetroi
- Program assumes that the target image has been cropped as defined by targetroi. Used to convert
to mm and then pixels in the cropped target space.transformedImage
- The resultant, transformed image being returned to the parent program.useTrilinearInt
- Flag to use tri-linear interpolation vs nearest neighbor in final transformed image.public static float[] getTransformedPtCoords_mm(int ptdepth, int ptwidth, int ptheight, java.util.Properties[] selfHeaders, Rectangle3D selfroi, ImageRegistration imgreg, java.util.Properties[] targetHeaders, Rectangle3D targetroi)
ptdepth,width,ht
- Pixel coords of point to be moved.selfHeaders
- Properties for each slice of the original image that is being transformed. Used to convert from
units of pixels to mm in the original image space.selfroi
- Program assumes that the original image has been cropped as defined by selfroi.
Used to convert to mm in the cropped original scanner space.shifts,rots,scales
- Define the affine transformation to be used on the original image.targetHeaders
- Properties for each slice of the target space that original image is being transformed to.
Used to convert to units of mm in the target space, and eventually into pixels in the target space.targetroi
- Program assumes that the target image has been cropped as defined by targetroi.
Used to convert to mm and then pixels in the cropped target space.public static float[] getTransformedPtCoords_mm(int ptdepth, int ptwidth, int ptheight, java.util.Properties[] selfHeaders, Rectangle3D selfroi, float xshift, float yshift, float zshift, float drot, float wrot, float hrot, float dscale, float wscale, float hscale, java.util.Properties[] targetHeaders, Rectangle3D targetroi)
public static float[] getTransformedPtCoords_mm(float ptdepth, float ptwidth, float ptheight, java.util.Properties[] selfHeaders, Rectangle3D selfroi, ImageRegistration imgreg, java.util.Properties[] targetHeaders, Rectangle3D targetroi)
public static float[] getTransformedPtCoords_mm(float ptdepth, float ptwidth, float ptheight, java.util.Properties[] selfHeaders, Rectangle3D selfroi, float xshift, float yshift, float zshift, float drot, float wrot, float hrot, float dscale, float wscale, float hscale, java.util.Properties[] targetHeaders, Rectangle3D targetroi)
public static float[] getTransformedPtCoords_px(int ptdepth, int ptwidth, int ptheight, java.util.Properties[] selfHeaders, Rectangle3D selfroi, ImageRegistration imgreg, java.util.Properties[] targetHeaders, Rectangle3D targetroi)
ptdepth,width,ht
- Pixel coords of point to be moved.selfHeaders
- Properties for each slice of the original image that is being transformed. Used to convert from
units of pixels to mm in the original image space.selfroi
- Program assumes that the original image has been cropped as defined by selfroi.
Used to convert to mm in the cropped original scanner space.shifts,rots,scales
- Define the affine transformation to be used on the original image.targetHeaders
- Properties for each slice of the target space that original image is being transformed to.
Used to convert to units of mm in the target space, and eventually into pixels in the target space.targetroi
- Program assumes that the target image has been cropped as defined by targetroi.
Used to convert to mm and then pixels in the cropped target space.public static float[] getTransformedPtCoords_px(int ptdepth, int ptwidth, int ptheight, java.util.Properties[] selfHeaders, Rectangle3D selfroi, float xshift, float yshift, float zshift, float drot, float wrot, float hrot, float dscale, float wscale, float hscale, java.util.Properties[] targetHeaders, Rectangle3D targetroi)
public static float[] getTransformedPtCoords_px(float ptdepth, float ptwidth, float ptheight, java.util.Properties[] selfHeaders, Rectangle3D selfroi, ImageRegistration imgreg, java.util.Properties[] targetHeaders, Rectangle3D targetroi)
public static float[] getTransformedPtCoords_px(float ptdepth, float ptwidth, float ptheight, java.util.Properties[] selfHeaders, Rectangle3D selfroi, float xshift, float yshift, float zshift, float drot, float wrot, float hrot, float dscale, float wscale, float hscale, java.util.Properties[] targetHeaders, Rectangle3D targetroi)
public static Point3D[][][] getTransformedImageCoords_mm(short[][][] img, java.util.Properties[] selfHeaders, Rectangle3D selfroi, ImageRegistration imgreg, java.util.Properties[] targetHeaders, Rectangle3D targetroi)
public static Point3D[][][] getTransformedImageCoords_mm(short[][][] img, java.util.Properties[] selfHeaders, Rectangle3D selfroi, float xshift, float yshift, float zshift, float drot, float wrot, float hrot, float dscale, float wscale, float hscale, java.util.Properties[] targetHeaders, Rectangle3D targetroi)
public static float[] invTransformPt_px(int ptdepth, int ptwidth, int ptheight, java.util.Properties[] selfHeaders, Rectangle3D selfroi, ImageRegistration imgreg, java.util.Properties[] targetHeaders, Rectangle3D targetroi)
ptdepth,width,ht
- Pixel coords of point to inverse-transformed.selfHeaders
- Properties for each slice of the original image that is being transformed. Used to convert from
units of pixels to mm in the original image space.selfroi
- Program assumes that the original image has been cropped as defined by selfroi.
Used to convert to mm in the cropped original scanner space.shifts,rots,scales
- Define the affine transformation to be used on the original image.targetHeaders
- Properties for each slice of the target space that original image is being transformed to.
Used to convert to units of mm in the target space, and eventually into pixels in the target space.targetroi
- Program assumes that the target image has been cropped as defined by targetroi.
Used to convert to mm and then pixels in the cropped target space.public static float[] invTransformPt_px(float ptdepth, float ptwidth, float ptheight, java.util.Properties[] selfHeaders, Rectangle3D selfroi, ImageRegistration imgreg, java.util.Properties[] targetHeaders, Rectangle3D targetroi)
public static float[] invTransformPt_px(int ptdepth, int ptwidth, int ptheight, java.util.Properties[] selfHeaders, Rectangle3D selfroi, float xshift, float yshift, float zshift, float drot, float wrot, float hrot, float dscale, float wscale, float hscale, java.util.Properties[] targetHeaders, Rectangle3D targetroi)
public static float[] invTransformPt_px(float ptdepth, float ptwidth, float ptheight, java.util.Properties[] selfHeaders, Rectangle3D selfroi, float xshift, float yshift, float zshift, float drot, float wrot, float hrot, float dscale, float wscale, float hscale, java.util.Properties[] targetHeaders, Rectangle3D targetroi)
public static short[][][] transform(short[][][] img, float dshift, float wshift, float hshift, float drot, float wrot, float hrot, Rectangle3D roi)
public static short[][] transform(short[][] img, float wshift, float hshift, float drot)
public static short[][] fillInTransformedHoles(short[][] A)
use tri-linear interp to fill in gaps.
public static short[][][] fillInTransformedHoles(short[][][] A)
use tri-linear interp to fill in gaps.
public static void threshold(byte[][] A, int thresh)
public static void threshold(byte[][][] A, int thresh)
public static void threshold(short[][] A, short thresh)
public static void threshold(short[][][] A, short thresh)
public static void threshold(short[][] A, int thresh)
public static void threshold(short[][][] A, int thresh)
public static void threshold(int[][] A, int thresh)
public static void threshold(int[][][] A, int thresh)
public static void threshold(float[][] A, float thresh)
public static void threshold(float[][][] A, float thresh)
public static float[][] invertGrayscale(float[][] A)
public static float[][][] invertGrayscale(float[][][] A)
public static short[][] invertGrayscale(short[][] A)
public static short[][][] invertGrayscale(short[][][] A)
public static void clip(byte[][] A, int thresh)
public static void clip(byte[][][] A, int thresh)
public static void clip(byte[][] A, int thresh, int newval)
public static void clip(byte[][][] A, int thresh, int newval)
public static void clip(short[][] A, int thresh)
public static void clip(short[][][] A, int thresh)
public static void clip(short[][] A, int thresh, int newval)
public static void clip(short[][][] A, int thresh, int newval)
public static void clip(int[][] A, int thresh)
public static void clip(int[][][] A, int thresh)
public static void clip(int[][] A, int thresh, int newval)
public static void clip(int[][][] A, int thresh, int newval)
public static void clip(float[][] A, float thresh)
public static void clip(float[][][] A, float thresh)
public static void clip(float[][] A, float thresh, float newval)
public static void clip(float[][][] A, float thresh, float newval)
public static void clipbelow(short[][] A, int thresh)
public static void clipbelow(short[][][] A, int thresh)
public static void clipbelow(short[][] A, int thresh, int newval)
public static void clipbelow(short[][][] A, int thresh, int newval)
public static void clipbelow(int[][] A, int thresh)
public static void clipbelow(int[][][] A, int thresh)
public static void clipbelow(int[][] A, int thresh, int newval)
public static void clipbelow(int[][][] A, int thresh, int newval)
public static void clipbelow(float[][] A, float thresh)
public static void clipbelow(float[][][] A, float thresh)
public static void clipbelow(float[][] A, float thresh, float newval)
public static void clipbelow(float[][][] A, float thresh, float newval)
public static void biThreshold(byte[][][] A, int minthresh, int maxthresh)
public static void biThreshold(short[][][] A, int minthresh, int maxthresh)
public static int autoThreshold(byte[][] A)
public static int autoThreshold(byte[][][] A)
public static int autoThreshold(short[][] AA)
public static int autoThreshold(short[][][] AA)
public static boolean[][] subtractMasks(boolean[][] A, boolean[][] B)
public static boolean[][][] subtractMasks(boolean[][][] A, boolean[][][] B)
public static byte[][] applyMask(byte[][] A, byte[][] mask)
public static byte[][] applyMask(byte[][] A, byte[][] mask, byte fillVal)
public static short[][] applyMask(short[][] A, byte[][] mask)
public static short[][] applyMask(short[][] A, byte[][] mask, short fillVal)
public static short[][] applyMask(short[][] A, boolean[][] mask)
public static short[][] applyMask(short[][] A, boolean[][] mask, short fillVal)
public static float[][] applyMask(float[][] A, byte[][] mask)
public static float[][] applyMask(float[][] A, byte[][] mask, float fillVal)
public static byte[][][] applyMask(byte[][][] A, boolean[][][] mask)
public static byte[][][] applyMask(byte[][][] A, byte[][][] mask)
public static short[][][] applyMask(short[][][] A, boolean[][][] mask)
public static short[][][] applyMask(short[][][] A, boolean[][][] mask, short fillVal)
public static short[][][] applyMask(short[][][] A, byte[][][] mask)
public static short[][][] applyMask(short[][][] A, byte[][][] mask, short fillVal)
public static int[] getHistogram(byte[] A)
public static int[] getHistogram(byte[][] A)
public static int[] getHistogram(byte[][][] A)
public static int[] getHistogram(short[] A)
public static int[] getHistogram(short[][] A)
public static int[] getHistogram(short[][] A, int nbins)
public static int[] getHistogram(short[][][] A)
public static int[] getHistogram(short[][][] A, int nbins)
public static int[] getHistogram(ij.ImagePlus imp, int nbins)
public static int[][] getHistogram(short[][][] A, short[][][] B)
public static int[][] getHistogram(short[][][] A, short[][][] B, int az, int ax, int ay)
public static int[] findOptKmeansBinsStarts(int[] ahisto, int nbins)
public static float[] getKmeansBins(int[] ahisto, int nbins)
public static float[] getKmeansBins(int[] ahisto, int nbins, java.lang.String initType)
public static float[] getKmeansBinsWO(int[] ahisto, int nbins)
public static float[] getKmeansBinsWO(int[] ahisto, int nbins, java.lang.String initType)
public static float getBinVariability(int[] histo, float[] binCentroids, int binAt)
public static float[] getEquiBins(int[] ahisto, int nbins)
public static short[][][] binImage(short[][][] A, int[] histoBinStarts)
public static short[][][] binImage(short[][][] A, int nbins)
public static java.awt.Rectangle getBoundingBox(boolean[][] A)
public static java.awt.Rectangle getBoundingBox(boolean[][] A, int buffer)
public static Rectangle3D getBoundingBox(boolean[][][] A)
public static Rectangle3D getBoundingBox(boolean[][][] A, int buffer)
public static Rectangle3D getBoundingBox(boolean[][][] A, int buffer, float zscale)
public static java.awt.Rectangle getBoundingBox(byte[][] A)
public static java.awt.Rectangle getBoundingBox(byte[][] A, int buffer)
public static Rectangle3D getBoundingBox(byte[][][] A)
public static Rectangle3D getBoundingBox(byte[][][] A, int buffer)
public static Rectangle3D getBoundingBox(byte[][][] A, int buffer, float zscale)
public static Rectangle3D getBoundingBox(byte[][][] A, int buffer, float zscale, int thresh)
public static java.awt.Rectangle getBoundingBox(short[][] A)
public static java.awt.Rectangle getBoundingBox(short[][] A, int buffer)
public static java.awt.Rectangle getBoundingBox(short[][] A, int buffer, int thresh)
public static Rectangle3D getBoundingBox(short[][][] A)
public static Rectangle3D getBoundingBox(short[][][] A, int buffer)
public static Rectangle3D getBoundingBox(short[][][] A, int buffer, float zscale)
public static Rectangle3D getBoundingBox(short[][][] A, int buffer, float zscale, int thresh)
public static java.awt.Rectangle getBoundingBox(float[][] A)
public static java.awt.Rectangle getBoundingBox(float[][] A, int buffer)
public static java.awt.Rectangle getBoundingBox(Point3D[][] A)
public static java.awt.Rectangle getBoundingBox(Point3D[][] A, int buffer)
public static Rectangle3D getObjectBoundingBox(byte[][][] image, int seedx, int seedy, int seedz)
public static Rectangle3D getObjectBoundingBox(byte[][][] image, int seedx, int seedy, int seedz, int pixelbuffer)
public static float getFarthestOnPtDist(boolean[][][] A, int cenx, int ceny, int cenz, float zscale)
public static float getFarthestOnPtDist(byte[][][] A, int cenx, int ceny, int cenz, int thresh, float zscale)
public static float getFarthestOnPtDist(short[][][] A, int cenx, int ceny, int cenz, int thresh, float zscale)
public static void edgeFinderReplaceA(byte[][] A)
public static void edgeFinderReplaceA(byte[][][] A)
public static byte[][] edgeFinder(byte[][] A)
public static byte[][][] edgeFinder(byte[][][] A)
public static byte[][] edgeFinder(short[][] A)
public static byte[][][] edgeFinder(short[][][] A)
public static byte[][] edgeFinder(float[][] A)
public static byte[][][] edgeFinder(float[][][] A)
public static int edgeFill3D(boolean[][][] A)
public static int edgeFill3D(boolean[][][] A, Rectangle3D roi, int conn)
public static int edgeFill3D(byte[][][] A)
public static int edgeFill3D(byte[][][] A, int conn)
public static int edgeFill3D(byte[][][] A, Rectangle3D roi, byte fillval, int conn)
public static int edgeFill3D(short[][][] A)
public static int edgeFill3D(short[][][] A, Rectangle3D roi, short fillval, int conn)
public static int edgeFill(boolean[][] A)
public static int edgeFill(boolean[][] A, int conn)
public static int edgeFill(boolean[][] A, java.awt.Rectangle rec)
public static int edgeFill(boolean[][] A, java.awt.Rectangle rec, int conn)
public static int edgeFill(byte[][] A)
public static int edgeFill(byte[][] A, java.awt.Rectangle rec)
public static int edgeFill(byte[][] A, int conn)
public static int edgeFill(byte[][] A, java.awt.Rectangle rec, byte fillval, int conn)
public static int edgeFill(short[][] A)
public static int edgeFill(short[][] A, java.awt.Rectangle rec)
public static int edgeFill(short[][] A, int conn)
public static int edgeFill(short[][] A, java.awt.Rectangle rec, short fillval, int conn)
public static int edgeFill(byte[][][] A, int sliceStart, int sliceEnd)
public static int edgeFill(byte[][][] A, int sliceStart, int sliceEnd, int conn3D)
public static int edgeFill(byte[][][] A)
public static int edgeFill(byte[][][] A, int conn)
public static int edgeFill(boolean[][][] A, int sliceStart, int sliceEnd)
public static int edgeFill(boolean[][][] A, int sliceStart, int sliceEnd, int conn3D)
public static int edgeFill(boolean[][][] A)
public static int edgeFill(boolean[][][] A, int conn3D)
public static int doOutsideRoiFill(boolean[][] A, java.awt.Rectangle roi)
public static int doOutsideRoiFill(byte[][] A, java.awt.Rectangle roi, byte fillval)
public static int doOutsideRoiFill(short[][] A, java.awt.Rectangle roi, short fillval)
public static int doOutsideRoiFill(boolean[][][] A, Rectangle3D roi)
public static int doOutsideRoiFill(byte[][][] A, Rectangle3D roi, byte fillval)
public static int doOutsideRoiFill(short[][][] A, Rectangle3D roi, short fillval)
public static int floodFill(boolean[][] A, int seedx, int seedy)
A
- 2D boolean image. Will be overwrittenseedx,y
- x,y pixel indices of seed locationroi
- 2D rectangle that closely encloses the non-zeros pixels in A. Used to speed up the calc.conn
- (default 8) connectivity of the search: 4 or 8 (include diagonals)public static int floodFill(boolean[][] A, int seedx, int seedy, int conn)
public static int floodFill(boolean[][] A, int seedx, int seedy, java.awt.Rectangle roi)
public static int floodFill(boolean[][] A, int seedx, int seedy, java.awt.Rectangle roi, int conn)
public static int floodFill(byte[][] A, int seedx, int seedy)
public static int floodFill(byte[][] A, int seedx, int seedy, int conn)
public static int floodFill(byte[][] A, int seedx, int seedy, byte fillval)
public static int floodFill(byte[][] A, int seedx, int seedy, java.awt.Rectangle roi)
public static int floodFill(byte[][] A, int seedx, int seedy, java.awt.Rectangle roi, int conn)
public static int floodFill(byte[][] A, int seedx, int seedy, java.awt.Rectangle roi, byte fillval, int conn)
public static int floodFill(short[][] A, int seedx, int seedy)
public static int floodFill(short[][] A, int seedx, int seedy, int conn)
public static int floodFill(short[][] A, int seedx, int seedy, short fillval)
public static int floodFill(short[][] A, int seedx, int seedy, java.awt.Rectangle roi)
public static int floodFill(short[][] A, int seedx, int seedy, java.awt.Rectangle roi, int conn)
public static int floodFill(short[][] A, int seedx, int seedy, java.awt.Rectangle roi, short fillval, int conn)
public static int floodFill(boolean[][][] A, int seedx, int seedy, int seedz)
public static int floodFill(boolean[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi)
public static int floodFill(boolean[][][] A, int seedx, int seedy, int seedz, int connectivity)
public static int floodFill(boolean[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, int connectivity)
public static int floodFill(boolean[][][] A, int seedx, int seedy, int seedz, boolean displayWarnings)
public static int floodFill(boolean[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, boolean displayWarnings)
public static int floodFill(boolean[][][] A, int seedx, int seedy, int seedz, int connectivity, boolean displayWarnings)
public static int floodFill(boolean[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, int connectivity, boolean displayWarnings)
public static int floodFill(byte[][][] A, int seedx, int seedy, int seedz)
Fast marching (below) differs by computing the threshold on the fly, and keeping track of the wavefront
WO 4/8/2014 adding ability to Label in-plane pixels by passing zscale of an image.
byte[][][]
- A is a 3D array where regions to be filled are zero-valued, starting with the seed location.
int
- seedx,y,z indices corresponds to w,h,d where d(z) is the image slice = the first index in the 3D array.Rectangle3D
- roi limits the region of search to the roi and sets all pixels outside to 255.byte
- fillval the value to set all connected pixels. If =0 then will perform a labeled flood-fill
where each pixel is given a value = to the number of pixels (or in-plane pixels) along the shortest
path to the seed location.int
- connectivity 6 or 26/27: default 6: defines whether pixels are connected side-to-side (6 connections)
or can be connected through all corners (26 connected pixels)float
- zscale the ratio of voxel dimension in the slice direction (d,z) to in-plane (w,h;x,y)
for when you want the distance to reflect 3D distances. Can convert this to [mm] by multiplying the
result by the in-plane pixel size.public static int floodFill(byte[][][] A, int seedx, int seedy, int seedz, byte fillval)
public static int floodFill(byte[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi)
public static int floodFill(byte[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, byte fillval)
public static int floodFill(byte[][][] A, int seedx, int seedy, int seedz, int conn)
public static int floodFill(byte[][][] A, int seedx, int seedy, int seedz, byte fillval, int conn)
public static int floodFill(byte[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, int conn)
public static int floodFill(byte[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, byte fillval, int connectivity)
public static int floodFill(byte[][][] A, int seedx, int seedy, int seedz, float zscale)
public static int floodFill(byte[][][] A, int seedx, int seedy, int seedz, byte fillval, float zscale)
public static int floodFill(byte[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, float zscale)
public static int floodFill(byte[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, byte fillval, float zscale)
public static int floodFill(byte[][][] A, int seedx, int seedy, int seedz, int conn, float zscale)
public static int floodFill(byte[][][] A, int seedx, int seedy, int seedz, byte fillval, int conn, float zscale)
public static int floodFill(byte[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, int conn, float zscale)
public static int floodFill(byte[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, byte fillval, int connectivity, float zscale)
public static int floodFill(short[][][] A, int seedx, int seedy, int seedz)
public static int floodFill(short[][][] A, int seedx, int seedy, int seedz, short fillval)
public static int floodFill(short[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi)
public static int floodFill(short[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, short fillval)
public static int floodFill(short[][][] A, int seedx, int seedy, int seedz, int conn)
public static int floodFill(short[][][] A, int seedx, int seedy, int seedz, short fillval, int conn)
public static int floodFill(short[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, int conn)
public static int floodFill(short[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, short fillval, int connectivity)
public static int floodFill(short[][][] A, int seedx, int seedy, int seedz, float zscale)
public static int floodFill(short[][][] A, int seedx, int seedy, int seedz, short fillval, float zscale)
public static int floodFill(short[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, float zscale)
public static int floodFill(short[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, short fillval, float zscale)
public static int floodFill(short[][][] A, int seedx, int seedy, int seedz, int conn, float zscale)
public static int floodFill(short[][][] A, int seedx, int seedy, int seedz, short fillval, int conn, float zscale)
public static int floodFill(short[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, int conn, float zscale)
public static int floodFill(short[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, short fillval, int connectivity, float zscale)
Fast marching (below) differs by computing the threshold on the fly, and keeping track of the wavefront.
WO 4/8/2014 adding ability to Label in in-plane pixels by passing zscale of an image.
short[][][]
- A \is a 3D array where regions to be filled are zero-valued, starting with the seed location.
int
- seedx,y,z indices corresponds to w,h,d where d(z) is the image slice = the first index in the 3D array.Rectangle3D
- roi limits the region of search to the roi and sets all pixels outside to 1024.byte
- fillval the value to set all connected pixels. If =0 then will perform a labeled flood-fill
where each pixel is given a value = to the number of pixels (or in-plane pixels) along the shortest path to
the seed location.int
- connectivity 6 or 26/27: default 6: defines whether pixels are connected side-to-side (6 connections)
or can be connected through all corners (26 connected pixels)float
- zscale the ratio of voxel dimension in the slice direction (d,z) to in-plane (w,h;x,y)
for when you want the distance to reflect 3D distances. Can convert this to [mm] by multiplying the result
by the in-plane pixel size.public static int floodFillNlabel(byte[][][] A, int seedx, int seedy, int seedz, int connectivity)
I altered the floodfill 3D code above to implement this when fillval=0 is used
public static int floodFillNlabel(byte[][][] A, int seedx, int seedy, int seedz, Rectangle3D roi, int connectivity)
public static void floodFillDownward(byte[][][] A, int seedx, int seedy, int seedz)
public static void floodFillInitialUpward(byte[][][] A, int seedx, int seedy, int seedz, byte fillval, float zscale)
fillval:
- if set to 0 = flag to use labeled flood fill versionpublic static void floodFillInitialUpward(short[][][] A, int seedx, int seedy, int seedz, short fillval, float zscale)
public static void floodFillInitialDownward(short[][][] A, int seedx, int seedy, int seedz, short fillval, float zscale)
public static boolean[][][] fastMarching(byte[][][] A, int seedx, int seedy, int seedz, int minthresh, int deltaMax, int maxNumberVoxels)
Omitting ROI input parameter for now.
WO 5/24/2012 byte version, but still working internally with integer
note: are filling bright region (e.g. lung vessel), not dark region (lung space or colon)
minthresh
- minimum intensity to consider.deltaMax
- max intensity difference between new seed and region meanmaxNumberVoxels
- (ex 200000)max number of voxels to include for phantompublic static boolean[][][] fastMarching(short[][][] A, int seedx, int seedy, int seedz, int minthresh, int deltaMax, int maxNumberVoxels)
public static boolean[][][] cleanUpMask(boolean[][][] A, float closingOpSize, float mmPPxy, float mmPPz, int seedx, int seedy, int seedz)
seedx,y,z
- point inside mask region to initiate flood-fill for connectednesspublic static boolean[][][] removeMaskHoles(boolean[][][] A)
seedx,y,z
- point inside mask region to initiate flood-fill for connectednesspublic static boolean[][][] getMediastinumMask(boolean[][][] hemiLungMasks)
public static boolean[][][] makeSparse(boolean[][][] A, float sparseSizeRad, float dscale)
The intent is to use with the colon nodule detection
where I have all the colon wall (edge) points and perform nodule detection at each point.
There are over 300,000 points so this is too slow. Since for each point there is a search in
the neighborhood for the best fit location, the process computes the fit multiple times for
a dense mesh of edge points, so the idea here is to thin out the edge points by the ~ the search
search neighborhood to remove this redundency and speed up the processing.
This code seems to work OK, but it is probably possible, because the identifcation of On points is
random, to leave gaps of twice the sparseness size.
public static boolean[][][] getCurrentImageMatrix(boolean[][][] gettypeofA)
public static boolean[][][] getCurrentImageMatrix(boolean[][][] gettypeofA, ij.ImagePlus imp)
public static boolean[][][] getCurrentImageMatrix(boolean[][][] gettypeofA, boolean useRoi, ij.ImagePlus imp)
public static byte[][][] getCurrentImageMatrix(byte[][][] gettypeofA)
public static byte[][][] getCurrentImageMatrix(byte[][][] gettypeofA, boolean useRoi)
public static byte[][][] getCurrentImageMatrix(byte[][][] gettypeofA, ij.ImagePlus imp)
public static byte[][][] getCurrentImageMatrix(byte[][][] gettypeofA, boolean useRoi, ij.ImagePlus imp)
public static short[][][] getCurrentImageMatrix(short[][][] gettypeofA)
public static short[][][] getCurrentImageMatrix(short[][][] gettypeofA, boolean useRoi)
public static short[][][] getCurrentImageMatrix(short[][][] gettypeofA, ij.ImagePlus imp)
public static short[][][] getCurrentImageMatrix(short[][][] gettypeofA, boolean useRoi, ij.ImagePlus imp)
public static int[][][] getCurrentImageMatrix(int[][][] gettypeofA)
public static int[][][] getCurrentImageMatrix(int[][][] gettypeofA, boolean useRoi)
public static float[][][] getCurrentImageMatrix(float[][][] gettypeofA)
public static float[][][] getCurrentImageMatrix(float[][][] gettypeofA, boolean useRoi, ij.ImagePlus imp)
public static byte[][] getCurrentImageMatrix(byte[][] gettypeofA)
public static byte[][] getCurrentImageMatrix(byte[][] gettypeofA, boolean useRoi)
public static short[][] getCurrentImageMatrix(short[][] gettypeofA)
public static short[][] getCurrentImageMatrix(short[][] gettypeofA, boolean useRoi)
public static int[][] getCurrentImageMatrix(int[][] gettypeofA)
public static int[][] getCurrentImageMatrix(int[][] gettypeofA, boolean useRoi)
public static float[][] getCurrentImageMatrix(float[][] gettypeofA)
public static float[][] getCurrentImageMatrix(float[][] gettypeofA, boolean useRoi)
public static float[][] convolve(float[][] pixels, float[][] kernel)
public static byte[][] convolve(byte[][] pixels, float[][] kernel)
public static float[][] convolve(int[][] pixels, float[][] kernel)
public static short[][] convolve(short[][] pixels, float[][] kernel)
public static byte[][][] convolve(byte[][][] pixels, float[][][] kernel, int start, int end)
public static byte[][][] convolve(byte[][][] pixels, float[][][] kernel, int skipval, int start, int end)
public static short[][][] convolve(short[][][] pixels, float[][][] kernel, int start, int end)
public static int[][][] convolve(int[][][] pixels, float[][][] kernel, int start, int end)
public static float[][][] convolve(float[][][] pixels, float[][][] kernel, int start, int end)
public static void convolve(byte[][][] A, float[][][] kernel, int skipval)
public static void convolve(byte[][][] A, float[][][] kernel)
public static void convolve(short[][][] A, float[][][] kernel)
public static void convolve(int[][][] A, float[][][] kernel)
public static void convolve(float[][][] A, float[][][] kernel)
public static float[][][] convolveFreq(float[][][] A, float[][] kernel2D)
public static short[][][] convolveFreq(short[][][] A, float[][] kernel2D)
public static short[][][] convolveFreq(short[][][] A, float[][][] K)
public static byte[][][] convolveFreq(byte[][][] A, float[][][] K)
public static int[][][] convolveFreq(int[][][] A, float[][][] K)
public static float[][][] convolveFreq(float[][][] A, float[][][] K)
public static float[][][] pad(float[][][] K, int ad, int aw, int ah)
public static byte[][] dilateGray(byte[][] A, boolean[][] mask)
public static byte[][][] dilateGray(byte[][][] A, boolean[][] mask)
public static short[][] dilateGray(short[][] A, boolean[][] mask)
public static short[][][] dilateGray(short[][][] A, boolean[][] mask)
public static byte[][] erodeGray(byte[][] A, boolean[][] mask)
public static byte[][][] erodeGray(byte[][][] A, boolean[][] mask)
public static short[][] erodeGray(short[][] A, boolean[][] mask)
public static short[][][] erodeGray(short[][][] A, boolean[][] mask)
public static byte[][] dilate(byte[][] A, int searchRad)
searchRad
- in units of pixelspublic static byte[][] dilate(byte[][] A, int searchRad, java.awt.Rectangle roi)
public static byte[][] dilate(byte[][] A, float searchRad)
public static byte[][] dilate(byte[][] A, float searchRad, java.awt.Rectangle roi)
public static boolean[][] dilate(boolean[][] A, int searchRad)
public static boolean[][] dilate(boolean[][] A, int searchRad, java.awt.Rectangle roi)
public static boolean[][] dilate(boolean[][] A, float searchRad)
public static boolean[][] dilate(boolean[][] A, float searchRad, java.awt.Rectangle roi)
public static byte[][][] dilate(byte[][][] A, int searchRad)
searchRad
- in units of pixelspublic static byte[][][] dilate(byte[][][] A, float searchRad)
public static byte[][][] dilate(byte[][][] A, int searchRad, Rectangle3D roi)
public static byte[][][] dilate(byte[][][] A, float searchRad, Rectangle3D roi)
public static byte[][][] dilate(byte[][][] A, int searchRad, float zscale)
public static byte[][][] dilate(byte[][][] A, float searchRad, float zscale)
public static byte[][][] dilate(byte[][][] A, int searchRad, float zscale, Rectangle3D roi)
public static byte[][][] dilate(byte[][][] A, float searchRad, float zscale, Rectangle3D roi)
public static boolean[][][] dilate(boolean[][][] A, int searchRad)
public static boolean[][][] dilate(boolean[][][] A, float searchRad)
public static boolean[][][] dilate(boolean[][][] A, int searchRad, Rectangle3D roi)
public static boolean[][][] dilate(boolean[][][] A, float searchRad, Rectangle3D roi)
public static boolean[][][] dilate(boolean[][][] A, int searchRad, float zscale)
public static boolean[][][] dilate(boolean[][][] A, float searchRad, float zscale)
public static boolean[][][] dilate(boolean[][][] A, int searchRad, float zscale, Rectangle3D roi)
public static boolean[][][] doDilate(boolean[][][] A, float searchRad, float zscale, Rectangle3D roi)
A
- boolean[][][] array is not changed herein.searchRad
- (float) size of dilation sphere/disk/element in units of in-plane pixels.zscale
- ratio of through-plane to in-plane pixel size.roi
- region over which to compute the dilation, but the dilated result will extend beyond this roi.public static boolean[][][] dilate(boolean[][][] A, float searchRad, float zscale, boolean[][][] edgePts)
public static boolean[][][] dilate(boolean[][][] A, float searchRad, float zscale, Rectangle3D roi)
A
- boolean[][][] image being dilated. A's value are not changed inside this function.searchRad
- Size of dilation disk [in-plane pixels], which is also the amount of pixels beyond the
active image boundaries that you need to have (padding zone) in order to compute the dilation at the edges.zscale
- ratio of pixel size in Z vs in-plane: mmPerPixelZ/mmPerPixelXYroi
- region of image over which to compute dilation. The resulting dilated image can extend
beyond this roi.public static byte[][] erode(byte[][] A, int searchRad)
public static byte[][] erode(byte[][] A, int searchRad, java.awt.Rectangle roi)
public static byte[][] erode(byte[][] A, float searchRad)
public static byte[][] erode(byte[][] A, float searchRad, java.awt.Rectangle roi)
public static boolean[][] erode(boolean[][] A, int searchRad)
public static boolean[][] erode(boolean[][] A, int searchRad, java.awt.Rectangle roi)
public static boolean[][] erode(boolean[][] A, float searchRad)
public static boolean[][] erode(boolean[][] A, float searchRad, java.awt.Rectangle roi)
public static byte[][][] erode(byte[][][] A, int searchRad)
public static byte[][][] erode(byte[][][] A, float searchRad)
public static byte[][][] erode(byte[][][] A, int searchRad, float zscale)
public static byte[][][] erode(byte[][][] A, float searchRad, float zscale)
public static byte[][][] erode(byte[][][] A, int searchRad, Rectangle3D roi)
public static byte[][][] erode(byte[][][] A, float searchRad, Rectangle3D roi)
public static byte[][][] erode(byte[][][] A, int searchRad, float zscale, Rectangle3D roi)
public static byte[][][] erode(byte[][][] A, float searchRad, float zscale, Rectangle3D roi)
public static boolean[][][] erode(boolean[][][] A, int searchRad)
public static boolean[][][] erode(boolean[][][] A, float searchRad)
public static boolean[][][] erode(boolean[][][] A, int searchRad, float zscale)
public static boolean[][][] erode(boolean[][][] A, float searchRad, float zscale)
public static boolean[][][] erode(boolean[][][] A, int searchRad, Rectangle3D roi)
public static boolean[][][] erode(boolean[][][] A, float searchRad, Rectangle3D roi)
public static boolean[][][] erode(boolean[][][] A, int searchRad, float zscale, Rectangle3D roi)
public static boolean[][][] doErode(boolean[][][] A, float searchRad, float zscale, Rectangle3D roi)
public static boolean[][][] erode(boolean[][][] A, float searchRad, float zscale, boolean[][][] edgePts)
public static boolean[][][] erode(boolean[][][] A, float searchRad, float zscale, Rectangle3D roi)
public static byte[][] openOp(byte[][] A, int searchRad)
public static byte[][] openOp(byte[][] A, int searchRad, java.awt.Rectangle roi)
public static byte[][][] openOp(byte[][][] A, int searchRad)
public static byte[][][] openOp(byte[][][] A, int searchRad, Rectangle3D roi)
public static byte[][][] openOp(byte[][][] A, int searchRad, float zscale)
public static byte[][][] openOp(byte[][][] A, int searchRad, float zscale, Rectangle3D roi)
public static byte[][] openOp(byte[][] A, float searchRad)
public static byte[][] openOp(byte[][] A, float searchRad, java.awt.Rectangle roi)
public static byte[][][] openOp(byte[][][] A, float searchRad)
public static byte[][][] openOp(byte[][][] A, float searchRad, Rectangle3D roi)
public static byte[][][] openOp(byte[][][] A, float searchRad, float zscale)
public static byte[][][] openOp(byte[][][] A, float searchRad, float zscale, Rectangle3D roi)
public static boolean[][] openOp(boolean[][] A, int searchRad)
public static boolean[][] openOp(boolean[][] A, int searchRad, java.awt.Rectangle roi)
public static boolean[][][] openOp(boolean[][][] A, int searchRad)
public static boolean[][][] openOp(boolean[][][] A, int searchRad, Rectangle3D roi)
public static boolean[][][] openOp(boolean[][][] A, int searchRad, float zscale)
public static boolean[][][] openOp(boolean[][][] A, int searchRad, float zscale, Rectangle3D roi)
public static boolean[][] openOp(boolean[][] A, float searchRad)
public static boolean[][] openOp(boolean[][] A, float searchRad, java.awt.Rectangle roi)
public static boolean[][][] openOp(boolean[][][] A, float searchRad)
public static boolean[][][] openOp(boolean[][][] A, float searchRad, Rectangle3D roi)
public static boolean[][][] openOp(boolean[][][] A, float searchRad, float zscale)
public static boolean[][][] openOp(boolean[][][] A, float searchRad, float zscale, Rectangle3D roi)
public static boolean[][][] openOp(boolean[][][] A, float searchRad, float zscale, boolean[][][] edgePts)
public static boolean[][][] closeOp(boolean[][][] A, float searchRad, float zscale, boolean[][][] edgePts)
public static byte[][] closeOp(byte[][] A, int searchRad)
public static byte[][] closeOp(byte[][] A, int searchRad, java.awt.Rectangle roi)
public static byte[][][] closeOp(byte[][][] A, int searchRad)
public static byte[][][] closeOp(byte[][][] A, int searchRad, Rectangle3D roi)
public static byte[][][] closeOp(byte[][][] A, int searchRad, float zscale)
public static byte[][][] closeOp(byte[][][] A, int searchRad, float zscale, Rectangle3D roi)
public static byte[][] closeOp(byte[][] A, float searchRad)
public static byte[][] closeOp(byte[][] A, float searchRad, java.awt.Rectangle roi)
public static byte[][][] closeOp(byte[][][] A, float searchRad)
public static byte[][][] closeOp(byte[][][] A, float searchRad, Rectangle3D roi)
public static byte[][][] closeOp(byte[][][] A, float searchRad, float zscale)
public static byte[][][] closeOp(byte[][][] A, float searchRad, float zscale, Rectangle3D roi)
public static boolean[][] closeOp(boolean[][] A, int searchRad)
public static boolean[][] closeOp(boolean[][] A, int searchRad, java.awt.Rectangle roi)
public static boolean[][][] closeOp(boolean[][][] A, int searchRad)
public static boolean[][][] closeOp(boolean[][][] A, int searchRad, Rectangle3D roi)
public static boolean[][][] closeOp(boolean[][][] A, int searchRad, float zscale)
public static boolean[][][] closeOp(boolean[][][] A, int searchRad, float zscale, Rectangle3D roi)
public static boolean[][] closeOp(boolean[][] A, float searchRad)
public static boolean[][] closeOp(boolean[][] A, float searchRad, java.awt.Rectangle roi)
public static boolean[][][] closeOp(boolean[][][] A, float searchRad)
public static boolean[][][] closeOp(boolean[][][] A, float searchRad, Rectangle3D roi)
public static boolean[][][] closeOp(boolean[][][] A, float searchRad, float zscale)
public static boolean[][][] closeOp(boolean[][][] A, float searchRad, float zscale, Rectangle3D roi)
public static float[][] correlation(float[][] pixels, float[][] kernel)
public static float[][] correlation(short[][] pixels, float[][] kernel)
public static float[][][] correlation(float[][][] A, float[][] kernel)
public static float[][][] correlation(short[][][] A, float[][] kernel)
public static float[][][] correlation(float[][][] pixels, float[][][] kernel)
public static float[][][] correlation(short[][][] pixels, float[][][] kernel)
public static float[][] statsCorrelation(float[][] pixels, float[][] kernel)
public static float[][][] statsCorrelation(float[][][] pixels, float[][][] kernel)
public static byte[][] statsCorrelation(int[][] pixels, float[][] kernel)
public static byte[][][] statsCorrelation(int[][][] pixels, float[][][] kernel)
public static float[][][][] statsCorrelation(float[][][] pixels, float[][][][] kernels)
public static byte[][][][] statsCorrelation(int[][][] pixels, float[][][][] kernels)
public static byte[][][][] statsCorrelation(short[][][] pixels, float[][][][] kernels)
public static byte[][][] statsCorrCirc(short[][][] pixels, float[][][][] kernels)
2/16/11 running in multi-threads/parallel
public static byte[][][] statsCorrCirc(short[][][] pixels, float[][][][] kernels, boolean[][][] mask)
public static byte[][][] statsCorrCirc(short[][][] pixels, float[][][][] kernels, int sd, int sw, int sh, int fd, int fw, int fh)
public static byte[][][] statsCorrCirc(short[][][] pixels, float[][][] kernel, int sd, int sw, int sh, int fd, int fw, int fh)
public static byte[][][] statsCorrCirc(short[][][] pixels, float[][][] kernel, boolean[][][] mask, int sd, int sw, int sh, int fd, int fw, int fh)
public static byte[][][] statsCorrCirc(short[][][] pixels, float[][][][] kernels, boolean[][][] mask, int sd, int sw, int sh, int fd, int fw, int fh)
pixels
- = image to be compared againstkernels
- = template/model applied over the image to detect like-objectsmask
- = area on the image to compute the correlation.sd,sw,sh
- = starting, bounding indices for the image search regionfd,fw,fh
- = final/ending, bounding indices for the image search regionpublic static byte[][][] aStatsCorrCirc(short[][][] pixels, float[][][][] kernels, boolean nonnegK, boolean[][][] mask, int sd, int sw, int sh, int fd, int fw, int fh)
WO 2/11/11 considering option to shift ellipsoidal mask to match shift in kernel such that elliptical search region is centered on kernel -- else may crop off the kernel edges. Nope, I don't think this will be a problem if the padding is appropriate in the kernel.
* this only works properly if the kernel dims are odd-valued, because of the 'ed,ew,eh' usage
WO 8/10/2012 added nonnegK flag, if is true and there is a kernel value <0 that means to not compute NCCC over that pixel -- effectively creates kernel mask.
sd,sw,sh and fd,fw,fh are the start and finish locations of the search region.
public static byte[][][] aStatsCorrCirc(short[][][] pixels, float[][][][] kernels)
public static byte[][][] aStatsCorrCirc(short[][][] pixels, float[][][][] kernels, boolean[][][] mask)
public static byte[][][] aStatsCorrCirc(short[][][] pixels, float[][][] kernel, boolean[][][] mask)
public static byte[][][] aStatsCorrCirc(short[][][] pixels, float[][][] kernel)
public static byte[][][] aStatsCorrCirc(short[][][] pixels, float[][][][] kernels, int sd, int sw, int sh, int fd, int fw, int fh)
public static byte[][][] aStatsCorrCirc(short[][][] pixels, float[][][][] kernels, boolean nonnedKflag, int sd, int sw, int sh, int fd, int fw, int fh)
public static byte[][][] aStatsCorrCirc(short[][][] pixels, float[][][] kernel, int sd, int sw, int sh, int fd, int fw, int fh)
public static byte[][][] aStatsCorrCirc(short[][][] pixels, float[][][] kernel, boolean nonnedKflag, int sd, int sw, int sh, int fd, int fw, int fh)
public static byte[][][] aStatsCorrCirc(short[][][] pixels, float[][][] kernel, boolean nonnedKflag, boolean[][][] mask, int sd, int sw, int sh, int fd, int fw, int fh)
public static float[][][][] fastApproxNCCC(short[][][] pixels, float[][][][] kernels)
public static Point2D[] statsCorrelation(int[][] pixels, float[][] kernel, Point2D[] cands)
public static Point3D[] statsCorrelation(int[][][] pixels, float[][][] kernel, Point3D[] cands)
public static Point3D[] statsCorrelation(int[][][] pixels, float[][][][] kernels, Point3D[] cands)
public static Point2D[] statsCorrelation(short[][] pixels, float[][] kernel, Point2D[] cands)
public static Point3D[] statsCorrelation(short[][][] pixels, float[][][] kernel, Point3D[] cands)
public static Point3Dint[] statsCorrelation(short[][][] pixels, float[][][] kernel, Point3Dint[] cands)
public static Point3D[] statsCorrelation(short[][][] pixels, float[][][][] kernels, Point3D[] cands)
public static Point3Dint[] statsCorrelation(short[][][] pixels, float[][][][] kernels, Point3Dint[] cands)
public static float imageStatsCorrelation(byte[][][] A, byte[][][] B)
public static float imageStatsCorrelation(byte[][][] A, byte[][][] B, Rectangle3D roi)
public static float imageStatsCorrelation(byte[][][] A, byte[][][] B, boolean[][][] roiMask)
public static float imageStatsCorrelation(byte[][][] A, byte[][][] B, boolean[][][] roiMask, Rectangle3D roi)
public static float imageStatsCorrelation(short[][][] A, byte[][][] B)
public static float imageStatsCorrelation(short[][][] A, byte[][][] B, boolean[][][] roiMask)
public static float imageStatsCorrelation(short[][][] A, byte[][][] B, Rectangle3D roi)
public static float imageStatsCorrelation(short[][][] A, byte[][][] B, boolean[][][] roiMask, Rectangle3D roi)
public static float imageStatsCorrelation(short[][] A, byte[][] B, boolean[][] roiMask)
public static float imageStatsCorrelation(byte[][] A, byte[][] B, boolean[][] roiMask)
public static float imageStatsCorrelation(short[][] A, short[][] B, boolean[][] roiMask)
public static float imageStatsCorrelation(short[][] A, byte[][] B)
public static float imageStatsCorrelation(short[][][] A, short[][][] B)
public static float imageStatsCorrelation(short[][][] A, short[][][] B, boolean[][][] roiMask)
public static float imageStatsCorrelation(short[][][] A, short[][][] B, Rectangle3D roi)
public static float imageStatsCorrelation(short[][][] A, short[][][] B, boolean[][][] roiMask, Rectangle3D roi)
public static double[][] neighborMult(int[][] A)
public static double[][] neighborProbMult(int[][] A)
public static float NMI(short[][][] A, short[][][] B, int az, int ax, int ay)
public static float fastNMI(short[][][] A, short[][][] B, int az, int ax, int ay)
public static float fastNMI(short[][][] A, short[][][] B, int[] ahisto, int[] bhisto, double bentropy, int az, int ax, int ay)
public static Point3D findNMImax(short[][][] A, short[][][] B, int az, int ax, int ay)
public static Point3D findfastNMImax(short[][][] A, short[][][] B)
public static Point3D findfastNMImax(short[][][] A, short[][][] B, int az, int ax, int ay)
public static float[][][] NMI(short[][][] A, short[][][] B)
public static Polygon3D getObjectContour(byte[][][] image, int seedd, int seedw, int seedh)
public static Polygon2D getOuterContour(boolean[][] image)
public static Polygon2D getOuterContour(boolean[][] image, java.awt.Rectangle roi)
public static Polygon2D getOuterContour(byte[][] image)
public static Polygon2D getOuterContour(byte[][] image, java.awt.Rectangle roi)
public static byte[][] fillOuterContour(byte[][] image, Polygon2D outerCon)
public static Polygon2D[] getOuterContour(boolean[][][] image)
public static Polygon2D[] getOuterContour(boolean[][][] image, java.awt.Rectangle roi)
public static Polygon2D[] getOuterContour(byte[][][] image)
public static Polygon2D[] getOuterContour(byte[][][] image, java.awt.Rectangle roi)
public static Polygon3D getOuterContour(byte[][][] image, Rectangle3D roi)
public static Polygon2D getOuterContour(short[][] image)
public static Polygon2D getOuterContour(short[][] image, int thresh)
public static Polygon2D getOuterContour(short[][] image, int thresh, int npts)
public static Polygon2D getOuterContour(short[][] image, int thresh, int npts, ij.gui.Roi roi)
public static Polygon2D[] getOuterContour(short[][][] image)
public static Polygon2D[] getOuterContour(short[][][] image, int thresh)
public static Polygon2D[] getOuterContour(short[][][] image, int thresh, int npts)
public static Polygon2D[] getOuterContour(short[][][] image, int thresh, int npts, ij.gui.Roi roi)
public static float[] getStackDepths(ij.ImagePlus imgs)
public static int[] sortBySliceLoc(ij.ImagePlus imp)
public static int[] sortBySlicePosZ_Time(ij.ImagePlus imp)
public static int[] sortBySlicePosZ(ij.ImagePlus imp)
public static void reorderSlices(ij.ImagePlus imp, int[] oi, int sliceoffset)
WO 2/9/11 need to handle case where reading in only a subset of the original image set used to create the io array -- i.e. lung mask image created after computing ROI the trick for LIDC mask images is that you want to order them based on the filename, not on their stack index.
WO 3/2/12 was searching based on filename, which is where it fails when stack cropped
now trying to do it based directly on the order in the original stack (I now do not
understand what sliceoffset is doing). It didn't crash and worked for a case where
they were not mis-ordered in the first place
ah, oi is from the original, uncropped stack, while the stack now associated with imp
is the cropped one, so need sliceoffset to align them
WO 8/6/2012 the approach above fails when the slices are reordered and cropped -- you still need to search the labels array for the next label in the list, as after cropping some indices in the original (uncropped) image now point to images that were cropped away, leading to arrayOutOfBounds error. So still need the filename search from before. This works for an LIDC dataset that had much reordering and was cropped.
8/13/2012 but it fails for JF data where first file is CT_009.jpg. The code assumes that the first file ends with 000.jpg. Now fixed to read through all slice labels, find the minimum number, and add that to all slices in subsequent search. Works for both LIDC and dose-response data.
10/2/2012 but fails for UR rat N49 where there is a missing slice.
10/10/2012 if we are going to search by filename, then why not pass in the filename rather than the indices?
2/7/2013 I coded a version (below) that is based directly on the filenames, so is robust to
missing files and other such things. It works. The filename version should probably be used everywhere
instead of this one based on incremental indices.
imp
- imageplus of the image set that needs to be ordered, e.g. maskfiles/imagefiles001.jpgoi
- ordered list of indices for basis dataset, e.g. imagefiles001.dcmsliceoffset
- how many images to skip at the beginning. When running on a dicom image set
typically ofilenames represents the full dicom list, but then the dicom images
are cropped and then the mask images are saved based upon the cropped dataset, thus
here ofilenames still has the full dataset while imp just has the cropped mask files.
public static void reorderSlices(ij.ImagePlus imp, java.lang.String[] ofilenames, int sliceoffset)
imp
- imageplus of the image set that needs to be ordered, e.g. maskfiles/imagefiles001.jpgofilenames
- ordered list of filenames for basis dataset, e.g. imagefiles001.dcmsliceoffset
- how many images to skip at the beginning. When running on a dicom image set
typically ofilenames represents the full dicom list, but then the dicom images
are cropped and then the mask images are saved based upon the cropped dataset, thus
here ofilenames still has the full dataset while imp just has the cropped mask files.
public static boolean[][][] getEdgeImage(boolean[][][] origBinImg)
public static boolean[][][] getEdgeImage(boolean[][][] origBinImg, boolean use27connections)
public static byte[][] skeletonize(byte[][] origBinImg)
Uses a lookup table to repeatably removes pixels from the edges of objects in a binary image, reducing them to signle pixel wide skeletons. Based on an a thinning algorithm by by Zhang and Suen (CACM, March 1984, 236-239). There is an entry in the table for each of the 256 possible 3x3 neighborhood configurations. An entry of '1' means delete pixel on first pass, '2' means delete pixel on second pass, and '3' means delete on either pass. A graphical representation of the 256 neighborhoods indexed by the table is available at "http://rsb.info.nih.gov/ij/images/skeletonize-table.gif".
public static byte[][][] dist3DfromPt(boolean[][][] vesselImg, int seedz, int seedx, int seedy)
public static float[][][] distTransformIsoVoxels(boolean[][][] origBinImg)
7/2/2012 WO seems to be working well. Fast on a small image set. Will need to test on a large one to see if it needs more speed-up.
8/22/2012 but computes distance assuming isotropic voxels, so I renamed that version to ..Isovoxels and created the one below to read in pixel dimensions and compute in mm
public static float[][][] distTransform_mm(boolean[][][] origBinImg, float sliceThickness, float mmPerPixelXY)
public static short[][] getMIPsliceIncr(short[][][] A, ImgProc.MIPcalcStruc M, float zscale, float incrphi, float incrtheta)
public static short[][] getMIPsliceIncr(short[][][] A, ImgProc.MIPcalcStruc M, float zscale, float incrphi, float incrtheta, boolean doFast)
public static short[][] getMIPsliceIncr(short[][][] A, ImgProc.MIPcalcStruc M, float zscale, float incrphi, float incrtheta, int clipZminPct, int clipZmaxPct, boolean doFast, boolean scaleByZ, int resolutionFlag, int BGthresh)
public static short[][] getMIPsliceIncr(short[][][] A, ImgProc.MIPcalcStruc M, float zscale, int cenx, int ceny, int cenz, float objectZoom, int clipZminPct, int clipZmaxPct, boolean doFast, boolean scaleByZ, int resolutionFlag, int BGthresh)
public static short[][] getMIPslice(short[][][] A, float zscale, float phi, float theta, float psi)
WO 11/13/2011 the offset approach does work and is very fast.
Rotation of image by phi degrees around original X-axis, followed by theta deg around rotated Y,
and psi around rotated Z
Intended so that can set identical rotations for difference runs.
A
- 3D matrix of pixel valueszscale
- ratio of sliceCenterSep to in-plan pixel size (assumes isotropic in-plane)phi
- [radians] amount to rotate around the original x-axis.theta
- [radians] amount to rotate around the original y-axis.psi
- [radians] amount to rotate around the original z-axis.clipZminPct
- clip off points that fall toward front of viewing block.clipZmaxPct
- clip off points that fall toward back of viewing block.scaleByZ
- make objects farther from front darker (good 3D effect).resolutionFlag
- 0: same in-plane pixel resolution as A. -1: half resolution as A. 1: double res of ABGthresh
- (10%) ignore pixels with intensity < BGthresh. if not set, or =0 then will use 10% of the rangepublic static short[][] getMIPslice(short[][][] A, float zscale, float phi, float theta, float psi, boolean scaleByZ)
public static short[][] getMIPslice(short[][][] A, float zscale, float phi, float theta, float psi, int clipZminPct, int clipZmaxPct, boolean scaleByZ, int resolutionFlag, int BGthresh, boolean doFast)
public static short[][] getMIPslice(short[][][] A, float zscale, float phi, float theta, float psi, int cenx, int ceny, int cenz, float objectZoom, int clipZminPct, int clipZmaxPct, boolean scaleByZ, int resolutionFlag, int BGthresh, boolean doFast)
public static byte[][] getMIPslice(byte[][][] A, float zscale, float phi, float theta, float psi)
A
- 3D matrix of pixel valueszscale
- ratio of sliceCenterSep to in-plan pixel size (assumes isotropic in-plane)phi
- [radians] amount to rotate around the original x-axis.theta
- [radians] amount to rotate around the original y-axis.psi
- [radians] amount to rotate around the original z-axis.roicenx,y,z
- [pixels] shift of origin for rotation of the object.objectZoom
- zoom in on object centered at roicen (values 0.2 -- 5)clipZminPct
- clip off points that fall toward front of viewing block.clipZmaxPct
- clip off points that fall toward back of viewing block.scaleByZ
- make objects farther from front darker (good 3D effect).resolutionFlag
- 0: same in-plane pixel resolution as A. -1: half resolution as A. 1: double res of ABGthresh
- (10%) ignore pixels with intensity < BGthresh. if not set, or =0 then will use 10% of the rangepublic static byte[][] getMIPslice(byte[][][] A, float zscale, float phi, float theta, float psi, int clipZminPct, int clipZmaxPct)
public static byte[][] getMIPslice(byte[][][] A, float zscale, float phi, float theta, float psi, boolean scaleByZ)
public static byte[][] getMIPslice(byte[][][] A, float zscale, float phi, float theta, float psi, int clipZminPct, int clipZmaxPct, boolean scaleByZ, int resolutionFlag, int BGthresh, boolean doFast)
public static byte[][] getMIPslice(byte[][][] A, float zscale, float phi, float theta, float psi, int cenx, int ceny, int cenz, float objectZoom, int clipZminPct, int clipZmaxPct, boolean scaleByZ, int resolutionFlag, int BGthresh, boolean doFast)
public static void resetMipRot(float theta, float phi)
public static short[][] getMIPsliceIncr(short[][][] A, float zscale, float incrphi, float incrtheta)
A
- 3D matrix of pixel valueszscale
- ratio of sliceCenterSep to in-plan pixel size (assumes isotropic in-plane)incrphi
- [radians] amount to rotate from the current state around the current x-axis.incrtheta
- [radians] amount to rotate from the current state around the current y-axis.clipZminPct
- clip off points that fall toward front of viewing block.clipZmaxPct
- clip off points that fall toward back of viewing block.doFast
- slightly faster calcualtion by taking nearest neighbor vs interpolating.scaleByZ
- make objects farther from front darker (good 3D effect).resolutionFlag
- 0: same in-plane pixel resolution as A. -1: half resolution as A. 1: double res of ABGthresh
- (10%) ignore pixels with intensity < BGthresh. if not set, or =0 then will use 10% of the rangepublic static short[][] getMIPsliceIncr(short[][][] A, float zscale, float incrphi, float incrtheta, boolean doFast)
public static short[][] getMIPsliceIncr(short[][][] A, float zscale, float incrphi, float incrtheta, int clipZminPct, int clipZmaxPct, boolean doFast, boolean scaleByZ, int resolutionFlag, int BGthresh)
public static short[][] getMIPsliceIncr(short[][][] A, float zscale, float incrphi, float incrtheta, int cenx, int ceny, int cenz, float objectZoom, int clipZminPct, int clipZmaxPct, boolean doFast, boolean scaleByZ, int resolutionFlag, int BGthresh)
public static byte[][] getMIPsliceIncr(byte[][][] A, float zscale, float incrphi, float incrtheta)
A
- 3D matrix of pixel valueszscale
- ratio of sliceCenterSep to in-plan pixel size (assumes isotropic in-plane)incrphi
- [radians] amount to rotate from the current state around the current x-axis.incrtheta
- [radians] amount to rotate from the current state around the current y-axis.clipZminPct
- clip off points that fall toward front of viewing block.clipZmaxPct
- clip off points that fall toward back of viewing block.doFast
- slightly faster calcualtion by taking nearest neighbor vs interpolating.resolutionFlag
- 0: same in-plane pixel resolution as A. -1: half resolution as A. 1: double res of ABGthresh
- (10%) ignore pixels with intensity < BGthresh. if not set, or =0 then will use 10% of the rangepublic static byte[][] getMIPsliceIncr(byte[][][] A, float zscale, float incrphi, float incrtheta, boolean doFast)
public static byte[][] getMIPsliceIncr(byte[][][] A, float zscale, float incrphi, float incrtheta, int clipZminPct, int clipZmaxPct, boolean doFast)
public static byte[][] getMIPsliceIncr(byte[][][] A, float zscale, float incrphi, float incrtheta, int clipZminPct, int clipZmaxPct, boolean doFast, boolean isBinary, int resolutionFlag, int BGthresh)
public static byte[][] getMIPsliceIncr(byte[][][] A, float zscale, float incrphi, float incrtheta, int cenx, int ceny, int cenz, float objectZoom, int clipZminPct, int clipZmaxPct, boolean doFast, boolean isBinary, int resolutionFlag, int BGthresh)
public static byte[][][] getMIPsliceLabeled(byte[][][] A, float zscale, float phi, float theta, byte[][][] Labels)
A
- 3D matrix of pixel valueszscale
- ratio of sliceCenterSep to in-plan pixel size (assumes isotropic in-plane)incrphi
- [radians] amount to rotate from the current state around the current x-axis.incrtheta
- [radians] amount to rotate from the current state around the current y-axis.clipZminPct
- clip off points that fall toward front of viewing block.clipZmaxPct
- clip off points that fall toward back of viewing block.doFast
- slightly faster calcualtion by taking nearest neighbor vs interpolating.scaleByZ
- make objects farther from front darker (good 3D effect).Labels[][][]
- labels(byte) for each pixelBGthresh
- (10%) ignore pixels with intensity < BGthresh. if not set, or <=0 then will use 10% of the rangepublic static byte[][][] getMIPsliceLabeled(byte[][][] A, float zscale, float phi, float theta, int clipZminPct, int clipZmaxPct, byte[][][] Labels)
public static byte[][][] getMIPsliceLabeled(byte[][][] A, float zscale, float phi, float theta, int clipZminPct, int clipZmaxPct, boolean doFast, boolean scaleByZ, byte[][][] Labels)
public static byte[][][] getMIPsliceLabeled(byte[][][] A, float zscale, float phi, float theta, int clipZminPct, int clipZmaxPct, boolean doFast, boolean scaleByZ, byte[][][] Labels, int BGthresh)
public static byte[][][] getMIPsliceLabeled(byte[][][] A, float zscale, float phi, float theta, int cenx, int ceny, int cenz, float objectZoom, int clipZminPct, int clipZmaxPct, boolean doFast, boolean scaleByZ, byte[][][] Labels, int BGthresh)
public static byte[][][] getMIPsliceIncrLabeled(byte[][][] A, float zscale, float incrphi, float incrtheta, byte[][][] Labels)
A
- 3D matrix of pixel valueszscale
- ratio of sliceCenterSep to in-plan pixel size (assumes isotropic in-plane)incrphi
- [radians] amount to rotate from the current state around the current x-axis.incrtheta
- [radians] amount to rotate from the current state around the current y-axis.clipZminPct
- clip off points that fall toward front of viewing block.clipZmaxPct
- clip off points that fall toward back of viewing block.doFast
- slightly faster calcualtion by taking nearest neighbor vs interpolating.scaleByZ
- make objects farther from front darker (good 3D effect).Labels[][][]
- color labels(byte) for each pixelresolutionFlag
- -1 = halfres, 0 = normal res, +1 = double res.BGthresh
- (10%) ignore pixels with intensity < BGthresh. if not set, or <=0 then will use 10% of the rangepublic static byte[][][] getMIPsliceIncrLabeled(byte[][][] A, float zscale, float incrphi, float incrtheta, boolean doFast, byte[][][] Labels)
public static byte[][][] getMIPsliceIncrLabeled(byte[][][] A, float zscale, float incrphi, float incrtheta, int clipZminPct, int clipZmaxPct, boolean doFast, byte[][][] Labels)
public static byte[][][] getMIPsliceIncrLabeled(byte[][][] A, float zscale, float incrphi, float incrtheta, int clipZminPct, int clipZmaxPct, boolean doFast, boolean isBinary, byte[][][] Labels)
public static byte[][][] getMIPsliceIncrLabeled(byte[][][] A, float zscale, float incrphi, float incrtheta, int clipZminPct, int clipZmaxPct, boolean doFast, boolean isBinary, byte[][][] Labels, int resolutionFlag, int BGthresh)
public static byte[][][] getMIPsliceIncrLabeled(byte[][][] A, float zscale, float incrphi, float incrtheta, int cenx, int ceny, int cenz, float objectZoom, int clipZminPct, int clipZmaxPct, boolean doFast, boolean isBinary, byte[][][] Labels, int resolutionFlag, int BGthresh)
public static short[][][] getMIPsliceLabeled(short[][][] A, float zscale, float phi, float theta, byte[][][] Labels)
A
- 3D matrix of pixel valueszscale
- ratio of sliceCenterSep to in-plan pixel size (assumes isotropic in-plane)incrphi
- [radians] amount to rotate from the current state around the current x-axis.incrtheta
- [radians] amount to rotate from the current state around the current y-axis.clipZminPct
- clip off points that fall toward front of viewing block.clipZmaxPct
- clip off points that fall toward back of viewing block.doFast
- slightly faster calcualtion by taking nearest neighbor vs interpolating.scaleByZ
- make objects farther from front darker (good 3D effect).Labels[][][]
- labels(byte) for each pixelBGthresh
- (10%) ignore pixels with intensity < BGthresh. if not set, or <=0 then will use 10% of the rangepublic static short[][][] getMIPsliceLabeled(short[][][] A, float zscale, float phi, float theta, int clipZminPct, int clipZmaxPct, byte[][][] Labels)
public static short[][][] getMIPsliceLabeled(short[][][] A, float zscale, float phi, float theta, int clipZminPct, int clipZmaxPct, boolean doFast, boolean scaleByZ, byte[][][] Labels)
public static short[][][] getMIPsliceLabeled(short[][][] A, float zscale, float phi, float theta, int clipZminPct, int clipZmaxPct, boolean doFast, boolean scaleByZ, byte[][][] Labels, int BGthresh)
public static short[][][] getMIPsliceLabeled(short[][][] A, float zscale, float phi, float theta, int cenx, int ceny, int cenz, float objectZoom, int clipZminPct, int clipZmaxPct, boolean doFast, boolean scaleByZ, byte[][][] Labels, int BGthresh)
public static short[][][] getMIPsliceIncrLabeled(short[][][] A, float zscale, float incrphi, float incrtheta, byte[][][] Labels)
A
- 3D matrix of pixel valueszscale
- ratio of sliceCenterSep to in-plan pixel size (assumes isotropic in-plane)incrphi
- [radians] amount to rotate from the current state around the current x-axis.incrtheta
- [radians] amount to rotate from the current state around the current y-axis.clipZminPct
- clip off points that fall toward front of viewing block.clipZmaxPct
- clip off points that fall toward back of viewing block.doFast
- slightly faster calcualtion by taking nearest neighbor vs interpolating.scaleByZ
- make objects farther from front darker (good 3D effect).Labels[][][]
- labels(byte) for each pixelresolutionFlag
- -1 = halfres, 0 = normal res, +1 = double res.BGthresh
- (10%) ignore pixels with intensity < BGthresh. if not set, or <=0 then will use 10% of the rangepublic static short[][][] getMIPsliceIncrLabeled(short[][][] A, float zscale, float incrphi, float incrtheta, boolean doFast, byte[][][] Labels)
public static short[][][] getMIPsliceIncrLabeled(short[][][] A, float zscale, float incrphi, float incrtheta, int clipZminPct, int clipZmaxPct, boolean doFast, boolean scaleByZ, byte[][][] Labels)
public static short[][][] getMIPsliceIncrLabeled(short[][][] A, float zscale, float incrphi, float incrtheta, int clipZminPct, int clipZmaxPct, boolean doFast, boolean scaleByZ, byte[][][] Labels, int resolutionFlag, int BGthresh)
public static short[][][] getMIPsliceIncrLabeled(short[][][] A, float zscale, float incrphi, float incrtheta, int cenx, int ceny, int cenz, float objectZoom, int clipZminPct, int clipZmaxPct, boolean doFast, boolean scaleByZ, byte[][][] Labels, int resolutionFlag, int BGthresh)
public static float[] getNormalThroughEdgePt(boolean[][][] edgeMap, Point3Dint ptAt, int searchrad)
public static float[] getNormalThroughEdgePt(boolean[][][] edgeMap, int ptAtx, int ptAty, int ptAtz, int searchrad)
public static float[] calcPlaneThroughPoints(Point3Dint[] pts)
public static float[] calcPlaneThroughPoints(int[] xs, int[] ys, int[] zs)
public static float[][][] addHalfBlock(float[][][] K, float[] vnorm)
8/10/2012 trying to limit depth fo block with -1 kernel values which will be ignored in aStatsCorrcalc()