NIH LISTSERV
NIH LISTSERV
IMAGEJ archives -- August 2008 (#26)

Go to: Previous Message | Next Message
Previous in Topic | Next in Topic
Previous by Same Author | Next by Same Author
Previous Page (August 2008) | Back to Main IMAGEJ Page


Options: Reply | Post a New Message | Join or Leave IMAGEJ, or Change Options | Search
View: Chronologically | Most Recent First | Wrap Text (Proportional Font) | Don't Wrap Text (Non-proportional Font)
*

Approved-By: [log in to unmask]
Message-ID:  <[log in to unmask]>
Date:         Tue, 5 Aug 2008 18:08:56 -0400
Reply-To:     ImageJ Interest Group <[log in to unmask]>
Sender:       ImageJ Interest Group <[log in to unmask]>
From:         Dan Siegal-Gaskins <[log in to unmask]>
Subject:      get current image filename/directory for macros

Hello all, After a couple of years of playing with ImageJ, I'm only now starting to write macros. What I have is a stack of 9 images, and I'd like to: 1. run the Image CorrelationJ plugin on the first slice 2. save the output to a text file 3. skip to the next slice 4. run the Image CorrelationJ plugin 5. go back to step 2 and loop through until the end of the stack Using the macro recorder, the command for running Image CorrelationJ is: -------------- run("Image CorrelationJ 1o", "target=filename.tif source=filename.tif correlation=[Fix slide (Source)] statistic=Average markers=Circle local=1 decimal=2"); -------------- So my first question is, how do I replace filename.tif with the a variable name of the current active image? I'm assuming there is some 'get filename' command that I could run, and then I could assign the result to a variable that I could use in the above statement. After that I need to save the data. The macro recorder shows this as: -------------- saveAs("Text", "active directory/foo.bar"); -------------- Similar to my first question, how do I use a variable for the directory which I can assign the directory to be the current working directory? Thanks, Dan




Back to: Top of message | Previous page | Main IMAGEJ page

NIH LISTSERV Home Page

CIT
Center for Information Technology
National Institutes of Health
Bethesda, Maryland 20892
301 594 6248 (v) 301 496 8294 (TDD)
Comments and Assistance
Accessibility wheelchair icon