Login  Register

Re: Thresholding and batch processing in FIJI/ImageJ

Posted by Aryeh Weiss on Feb 21, 2016; 7:29am
URL: http://imagej.273.s1.nabble.com/Thresholding-and-batch-processing-in-FIJI-ImageJ-tp5015626p5015683.html

On 21/02/2016 12:59 AM, wustlmed wrote:
> Thanks Aryeh,
>
> I looked through the link you suggested and unfortunately the suggested code
> isn't working for me. I copied it directly into the editor and keep getting
> an error in line 9 which says cumHist[0] = values[counts[0]<]> ;. Like I
> said I'm new at this and so I'm not sure how to troubleshoot this.
I cut and pasted eh macro from that link into my script editor, and it
worked. I had to repair a few lines that were split in the pasted code.
Since this line is close to the top , I suggest that you step through
the macro, using print statements to verify each line.
> Furthermore, I think the output of this script would be a some value that
> could hopefully be fed into the threshold function allowing me to draw the
> cutoff at a certain percentage of values, but what I'm not sure is /how/ to
> pass that value along to the threshold function. I looked at some
> documentation and it seems like you can pass different predetermined methods
> like Li or Triangle for the threshold but not specific values.

I think that setThreshold will do that
http://imagej.nih.gov/ij/developer/macro/functions.html#setThreshold

An excellent way to get started is to peruse the macro function list to
get a feel for what is there, and also to look at the many examples that
yo can find here:
http://imagej.nih.gov/ij/macros/

In this list, I found three macros that have "threshold" in their title.
You might some some useful ideas in those.

Best regards
--aryeh

--
Aryeh Weiss
Faculty of Engineering
Bar Ilan University
Ramat Gan 52900 Israel

Ph:  972-3-5317638
FAX: 972-3-7384051

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html