Re: 3D Region of Interest
Posted by BirthingXS on Nov 29, 2016; 11:47am
URL: http://imagej.273.s1.nabble.com/3D-Region-of-Interest-tp5017648p5017650.html
Hi Thomas,
I'm having some trouble with loading some of the contents of the link, are you able to elaborate on what the function does (Sorry as I'm not a programmer myself). Also if it helps, this is the function I'm using for 2D and would like it to be translated to 3D.
setOption("BlackBackground");
original = getTitle();
run("Invert");
roiManager("reset");
run("Create Selection");
run("Enlarge...", "enlarge=2");
roiManager("Add");
roiManager("Split");
roiManager("select", 0);
roiManager("Delete");
selectWindow(original);
run("Invert");
run("Set Measurements...", "area stack display redirect=None decimal=3");
for(i=0; i<roiManager("count"); i++) {
roiManager("Select", i);
roiManager("Measure");
//if the selection is empty (included holes) the measurement and result will be deleted
if(getResult("%Area", nResults-1)==0) {
roiManager("Delete");
IJ.deleteRows(nResults-1, nResults-1);
i--;
//if there is a particle inside the selection the CRU and tne clusters will be analyzed
} else {
setResult("Label", nResults-1, getResultLabel(nResults-1) + "-CRU");
run("Analyze Particles...", "display");
}
}
Additionally, I've been in touch with Jan Brocher with some of these issues and he suggested you might be able to offer some insights. Do you mind if I get in touch with you via email?
Cheers,
Xin