Login  Register

Aborting a macro? (Was: brighness values...)

Posted by Joachim Wesner on Apr 07, 2006; 5:33pm
URL: http://imagej.273.s1.nabble.com/brightness-values-in-every-single-pixel-x-y-coordinates-included-tp3703172p3703174.html

Hi

I just was going to suggest a similar macro. BTW, I noticed, if a macro
takes very long to process or runs totally berserk, how to abort it?
I see there is a built in function to do it, is there a way to access this
from the main window?

Joachim



                                                                                                                                       
                      Wayne Rasband                                                                                                    
                      <[hidden email]>            An:      [hidden email]                                                            
                      Gesendet von:            Kopie:                                                                                  
                      ImageJ Interest          Thema:   Re: brightness values in every single pixel (x,y coordinates included)        
                      Group                                                                                                            
                      <[hidden email]                                                                                                
                      .GOV>                                                                                                            
                                                                                                                                       
                                                                                                                                       
                      07.04.2006 16:53                                                                                                
                      Bitte antworten                                                                                                  
                      an ImageJ                                                                                                        
                      Interest Group                                                                                                  
                                                                                                                                       




> I'm sure that someone already mentioned this idea before, but what I'm
> looking for is macro or plugin which returns brightness value of every
> single pixel of image, according to its XY coordinates in form of the
> list, ie. X| Y|     Bright.  Value (0-255)|
>                1| 1|     0|
>                1| 2|     1|
>
> etc. etc..
>
> I'd like to export this data to Excel sheet for further analysis.
> Does anybody has any clue about solution of this question?

Here is a macro that does this:

   requires("1.35g");
   f = File.open(""); // prompt for file name
   for (y=0; y<getHeight; y++) {
       showProgress(y, getHeight);
       for (x=0; x<getWidth; x++) {
           print(f, x+"\t"+y+"\t"+getPixel(x,y));
       }
   }

-wayne



______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________