Login  Register

Re: Routine to analyze image line by line.

Posted by George Patterson on Nov 17, 2020; 2:47am
URL: http://imagej.273.s1.nabble.com/Routine-to-analyze-image-line-by-line-tp5024181p5024192.html

Hi Ethan,
Yes, you'll need to to this line
if (getPixel(i,j ) >= Threshold){

Also, if you want the search to start at the bottom, you may need to change
the inner loop to something like the following. You should also remove the
semicolons at the end of the for loops.
for(j=511; j>=0; j--) { // start at the bottom edge

And then you would also need to change the run("Specify...) line.
That seems pretty slow. May I suggest replacing the specify and fill with
another loop to set the pixels to zero.
for(k=511; k>=j; k--) {
         setPixel(i,k,0);
}

Best of luck,
George




On Mon, Nov 16, 2020 at 11:35 AM Ethan Cohen <[hidden email]>
wrote:

> getPixel(x, y) ?
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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