Posted by
Brandon Hurr on
Jan 24, 2016; 5:57am
URL: http://imagej.273.s1.nabble.com/area-calculations-discrepancy-in-the-manual-and-batch-results-tp5015432p5015442.html
The logic in your workflow doesn't make sense here:
1) Select the line tool
2) Wait for my input
3) Rotate my line by 90 degrees.
3) Calculate slope and extrapolate the line to the edges of my image.
4) Make a polygon from the line coordinates and add it to ROI
5) Inverse my selection and add it to ROI
6) Duplicate the original image
7) Select ROI 0
8) Set foreground colour to blue
9) Fill the other slice with foreground colour.
10) Use thresholder to identify black pixels and make a selection
11) Restore selction on the original image and calculate the area of the
selection.
12) Repeat 6-11 for ROI 1.
You don't need to perpendicular line. You need the continuation of your
line to the edges of the image. I already gave you code for steps 1-5 and
it did work (but I fixed a potential bug in it related to completely
vertical line selections).
Also, you've got it set up for potentially going into batch mode. When you
do that, the image will not be displayed and your user will not be able to
input the initial line. If you want to loop through a series of images,
that's different than just putting it in batchmode.
I've changed some things and functionalized your segmentation (since it's
the same) and it seems to be working for me. Can you test again with this
and report back?
HTH,
B
On Fri, Jan 22, 2016 at 5:32 AM, Ramprasad Neethiraj <
[hidden email]>
wrote:
> Hi all,
>
> I just realized that I had sent a different version of my script from the
> one I was using for testing. Please find the script attached.
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html