Saving macro results to array in java?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Saving macro results to array in java?

ultrah
hi,

I want to work with with the results of a macro in java. currently I export the results to xls and reimport them.

for example:

IJ.run("Shape Descriptors", "display=[Mean particle details] size=500-100000 circularity=0-1 show=Nothing display exclude clear");
               
IJ.saveAs("Text", "[path]\\Mean values.xls");

is there a way to do this without exporting to xls ?
Reply | Threaded
Open this post in threaded view
|

Re: Saving macro results to array in java?

Rasband, Wayne (NIH/NIMH) [E]
On Jun 1, 2010, at 5:20 AM, ultrah wrote:

> hi,
>
> I want to work with with the results of a macro in java. currently I export
> the results to xls and reimport them.
>
> for example:
>
> IJ.run("Shape Descriptors", "display=[Mean particle details] size=500-100000
> circularity=0-1 show=Nothing display exclude clear");
>
> IJ.saveAs("Text", "[path]\\Mean values.xls");
>
> is there a way to do this without exporting to xls ?

Modify the Shape Descriptors plugin so it writes to the standard results table using the ResultsTable.addValue() method. There is an example at

    http://rsbweb.nih.gov/ij/plugins/sine-cosine.html

-wayne
Reply | Threaded
Open this post in threaded view
|

Antwort: Saving macro results to array in java?

Joachim Wesner
In reply to this post by ultrah
Hi,

I see no simple way to "directly" do this, i.e. write macro results into
"Java memory space" to later analyze it, HOWEVER, if you already have a
Java plugin with source code,
you can call other plugins or macros from there and also read their results
from the results table, see the "Writing ImagJ Plugins" tutorial!

Mit freundlichen Grüßen / Best regards

Joachim Wesner



                                                                           
             ultrah                                                        
             <ftw4real@GOOGLEM                                            
             AIL.COM>                                                   An
             Gesendet von:              [hidden email]                
             ImageJ Interest                                         Kopie
             Group                                                        
             <[hidden email].                                       Thema
             GOV>                       Saving macro results to array in  
                                        java?                              
                                                                           
             01.06.2010 11:20                                              
                                                                           
                                                                           
              Bitte antworten                                              
                    an                                                    
              ImageJ Interest                                              
                   Group                                                  
             <[hidden email].                                            
                   GOV>                                                    
                                                                           
                                                                           




hi,

I want to work with with the results of a macro in java. currently I export
the results to xls and reimport them.

for example:

IJ.run("Shape Descriptors", "display=[Mean particle details]
size=500-100000
circularity=0-1 show=Nothing display exclude clear");

IJ.saveAs("Text", "[path]\\Mean values.xls");

is there a way to do this without exporting to xls ?
--
View this message in context:
http://imagej.588099.n2.nabble.com/Saving-macro-results-to-array-in-java-tp5125190p5125190.html

Sent from the ImageJ mailing list archive at Nabble.com.



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