Package | Description |
---|---|
woSource | |
woSource.math |
Class and Description |
---|
ArrayColorDisplay
WO started 4/21-22/08, latest edits/features 1/2013
ArrayColorDisplay creates internally an RGB image, rather than merely a grayscale image as with ArrayDisplay. ACD uses ColorProcessors that store RGB values as 3 byte values, thus the grayscale image needs to be scaled 0..255. This is used, for example, for image overlays within image registration software; and 3D rendering of vessels with different shaded colors for each vessel tree. |
ArrayColorDisplay3D
ACD3D handles having 3 windows open simultaneously and cooperatively.
|
ArrayDisplay
ArrayDisplay is meant to take the hassle out of creating a window to display 2D and 3D (and 4D) data by
handling all the windows variables (graphics, canvas, display, processors) automatically so the user does not
have to know about these aspects.
|
HeartLongAxis |
Image3Dinfo |
NoduleCandidate |
OptMath |
Point2D |
Point3D |
Point3Dint |
Point4Dint |
Polygon2D
polygon with coords as float WO 12/17/01
|
Rectangle3D |
SeriesImagesClass |
SimTagImageInfo |
VesselBranch |
VesselTree
WO VesselTree is a class/data structure to describe a tree structure containing many branches.
|
Class and Description |
---|
ArrayColorDisplay
WO started 4/21-22/08, latest edits/features 1/2013
ArrayColorDisplay creates internally an RGB image, rather than merely a grayscale image as with ArrayDisplay. ACD uses ColorProcessors that store RGB values as 3 byte values, thus the grayscale image needs to be scaled 0..255. This is used, for example, for image overlays within image registration software; and 3D rendering of vessels with different shaded colors for each vessel tree. |
ArrayDisplay
ArrayDisplay is meant to take the hassle out of creating a window to display 2D and 3D (and 4D) data by
handling all the windows variables (graphics, canvas, display, processors) automatically so the user does not
have to know about these aspects.
|
Complex |
HeartLongAxis |
HyperSkelPair
for vesselSegmentation, when a tree crosses another you need a hyperskel pair to jump the crossing
|
Image3Dinfo |
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
|
LIDCnodule |
NoduleCandidate |
Point2D |
Point3D |
Point3Dint |
Point4D |
Point4Dint |
Polygon2D
polygon with coords as float WO 12/17/01
|
Polygon3D |
Polygon3Dint |
Rectangle3D |
SeriesImagesClass |
SimTagImageInfo |
VesselBranch |
VesselTree
WO VesselTree is a class/data structure to describe a tree structure containing many branches.
|