public class LIDCreview extends ImageReviewer implements ij.plugin.PlugIn
working_canvas| Constructor and Description |
|---|
LIDCreview() |
| Modifier and Type | Method and Description |
|---|---|
float[][][][] |
addWall2Template(float[][][][] A,
float k,
float i,
float j,
float dilateSize) |
float[][][][] |
addWall2Template(float[][][][] A,
NoduleCandidate cand,
float dilateSize) |
float[][][] |
addWall2Template(float[][][] A,
float k,
float i,
float j,
float dilateSize) |
float[][][] |
addWall2Template(float[][][] A,
NoduleCandidate cand,
float dilateSize) |
void |
applyTemplates() |
float[][][][] |
calcKall(float radius,
float wpadding,
float dscale,
float wscale,
float hscale)
public NoduleCandidate NCCCtestLoc(NoduleCandidate candAt, float radAt, float padAt) {
// now want to try sub-pixel shifts at this best radius
byte[][][] corrAll; // will process together the 3 shifts at each krad
Point3D bestFitLoc3D = new Point3D();
NoduleCandidate bestFitLoc = new NoduleCandidate();
float[][][] kshift;
// check span of sub-pixel locations around this one: 5x5x5 = 125 places
// these shifts are in units of pixels, unique for each direction.
|
float[][][][] |
calcKall(float radius,
float wpadding,
float dscale,
float wscale,
float hscale,
float shiftd,
float shiftw,
float shifth) |
float |
candidateSep(NoduleCandidate A,
NoduleCandidate B)
NoduleCandidate[][][] candTrials;
float[] testRadii = {1f, 1.1f, 1.2f, 1.3f, 1.4f, 1.5f, 1.6f, 1.7f, 1.8f, 1.9f, 2f,
2.2f, 2.4f, 2.6f, 2.8f, 3f,
3.5f, 4f, 4.5f, 5f, 5.5f, 6f, 6.5f, 7f, 7.5f, 8f, 8.5f, 9f};
float[] testPaddings = {1.5f, 2f, 2.5f, 3f};
public void gatAllPtsTrials() {
candTrials = new NoduleCandidate[NtrainingNods][testRadii.length][testPaddings.length];
}
public void getPtTrials(int firstPtCand, int ptAt) {
String studyDirAt = new String(nodsOfInterest[firstPtCand].patientID);
int l = firstPtCand;
// if (origAd != null) origAd.destroy();
// System.gc();
// read in the image data for that study
getPtInputDirInfo(studyDirAt); // sets LIDCstudyInputDir, LIDCnImages & LIDCimageExt.
|
float |
candidateSep(Point3D A,
NoduleCandidate B) |
void |
customButFunc() |
void |
customChoiceFunc() |
void |
get3DviewOfNodule() |
void |
getLungMask() |
void |
getObjectMask() |
void |
initPtNodules() |
boolean |
kernelHitsChestWall(NoduleCandidate c,
float[][][] A) |
void |
NCCCoptLoc(int candStart,
int candEnd) |
void |
NCCCoptRadii(int candStart,
int candEnd,
int iter)
public NoduleCandidate NCCCtestRadPad(NoduleCandidate candAt, float radAt, float padAt) {
// find best match using in-between-sized templates
// with iter, permit smaller increments in opt radius
float[][][][] kall = new float[MathI.round(sliceThickness)][1][1][1];
byte[][][] corrAll; // will process together the 3 shifts at each krad
Point3D bestFitLoc3D = new Point3D();
NoduleCandidate bestFitLoc = new NoduleCandidate();
float dd,ww,hh;
float orig_slice;
// ArraysI.print(zoomRads," zoomrads for cand "+c);
dd = candAt.sliceI-(float)MathI.round(candAt.sliceI);
ww = candAt.x-(float)MathI.round(candAt.x);
hh = candAt.y-(float)MathI.round(candAt.y);
kall = calcKall(radAt, padAt, sliceThickness, mmPerPixelX, mmPerPixelY,
/* impart the shifts ** dd,ww,hh);
// check in 3x5x5 cube around current point and within LungMask
// invoke non-// version
corrAll = ImgProc.statsCorrCirc(origimg, kall, lungMask, MathI.round(candAt.sliceI)-1,
MathI.round(candAt.x)-2, MathI.round(candAt.y)-2,
MathI.round(candAt.sliceI)+1,
MathI.round(candAt.x)+2, MathI.round(candAt.y)+2);
bestFitLoc3D = ArraysI.maxpt(corrAll);
bestFitLoc3D.x -= dd;
bestFitLoc3D.y -= ww;
bestFitLoc3D.z -= hh;
bestFitLoc = new NoduleCandidate(candAt.patientID, bestFitLoc3D.x, bestFitLoc3D.y, bestFitLoc3D.z,
radAt, padAt, bestFitLoc3D.value);
IJ.log(" best rad/pad combo for cand "+candAt+": "+bestFitLoc);
return bestFitLoc;
} // end test a radius/padding combo
|
void |
optParams() |
protected void |
redisplay() |
void |
run(java.lang.String arg)
This method is called when the plugin is loaded.
|
void |
setNewSlice() |
void |
setNewStudy() |
void |
setupImg() |
java.lang.String |
toString() |
void |
UpdateScreen() |
adjustCurSlice, cropToObjectROI, findClosestMark, get3Dview, get3DviewOfmark, getObjectMaskFromFiles, getObjectMaskFromFiles, getPtInputDirInfo, resetwidgets, run, runGUI, setGUIWinLevelWidgets, setupImg, setupImg, setupImg, spaceWindowsOnScreen, updateMarkingPanel, UpdateSelection, UpdateSelectionImageReviewerkeyPressed, mouseDragged, mouseMoved, mousePressed, mouseReleasedpublic void run(java.lang.String arg)
ij.plugin.PlugInrun in interface ij.plugin.PlugInrun in class ImageReviewerpublic void customButFunc()
customButFunc in class ImageReviewerpublic void customChoiceFunc()
customChoiceFunc in class ImageReviewerpublic void setNewSlice()
setNewSlice in class ImageReviewerpublic void setNewStudy()
setNewStudy in class ImageReviewerpublic void get3DviewOfNodule()
public void UpdateScreen()
UpdateScreen in class ImageReviewerpublic void optParams()
public void applyTemplates()
public float candidateSep(NoduleCandidate A, NoduleCandidate B)
public float candidateSep(Point3D A, NoduleCandidate B)
public void NCCCoptRadii(int candStart,
int candEnd,
int iter)
public void NCCCoptLoc(int candStart,
int candEnd)
public float[][][][] calcKall(float radius,
float wpadding,
float dscale,
float wscale,
float hscale)
public float[][][][] calcKall(float radius,
float wpadding,
float dscale,
float wscale,
float hscale,
float shiftd,
float shiftw,
float shifth)
public boolean kernelHitsChestWall(NoduleCandidate c, float[][][] A)
public float[][][] addWall2Template(float[][][] A,
NoduleCandidate cand,
float dilateSize)
public float[][][] addWall2Template(float[][][] A,
float k,
float i,
float j,
float dilateSize)
public float[][][][] addWall2Template(float[][][][] A,
NoduleCandidate cand,
float dilateSize)
public float[][][][] addWall2Template(float[][][][] A,
float k,
float i,
float j,
float dilateSize)
protected void redisplay()
redisplay in class ImageReviewerpublic void initPtNodules()
public void setupImg()
setupImg in class ImageReviewerpublic void getObjectMask()
public void getLungMask()
public java.lang.String toString()
toString in class ImageReviewer