Login  Register

Re: Automating Image Processing and Problems with FFTJ

Posted by bnorthan on Sep 11, 2013; 12:59pm
URL: http://imagej.273.s1.nabble.com/Automating-Image-Processing-and-Problems-with-FFTJ-tp5004660p5004752.html

Hi Aaron

If I understand your question it should be simple.  Just point the saveAs
command wherever you want.  You can assign variables to different
directories...

directory1="/someDirectory/someLocation/"
directory2="/someDirectory/someOtherLocation/"

saveAs("format", directory1+someName);
(focus a different image)
saveAs("format", directory2+someName);

Saving your images where you want with the macro recorder running will also
produce the commands you need.  Then just put them in the loop.


On Wed, Sep 11, 2013 at 6:45 AM, Aaron Hendrickson <[hidden email]>wrote:

> Brian,
>
> The modified FFTJ and accompanying macro worked very well!  I verified that
> it was functional by running the macro on an entire image and then randomly
> selected rows from the original image and processed them by hand.  Luckily,
> I got the same numbers using both methods.  It was also pretty
> straightforward to modify the macro to process columns.
>
> One thing I wanted to ask you was a question regarding multiple output
> directories.  When I run the macro, it creates and saves the individual
> rows (or columns) plus its respective power spectrum.  Therefore, after the
> macro is done running I open all the row image and PS image into a stack
> and create a substack to separate them.   After that I save the row images
> and PS's separately.  With this said here is my question:  Is it possible
> to specify two output directories in the macro such that the row images and
> PS's are saved to different folders?
>
> Regardless if this can be done or not, I want to thank you for your help
> with this macro.  It works great and has saved me a lot of time with my
> work.
>
> Cheers,
> Aaron
>
>
> On Tue, Sep 10, 2013 at 6:59 AM, Aaron Hendrickson <[hidden email]
> >wrote:
>
> > Brian,
> >
> > This will be very helpful!  I will take a look at it today and let you
> > know what happens.
> >
> > Respectfully,
> > Aaron
> >
> >
> > On Mon, Sep 9, 2013 at 12:00 PM, Brian Northan <[hidden email]>
> wrote:
> >
> >> >
> >> > That said, do you know of how the
> >> >>>> source ode of FFTJ would have to be modified to do the batch
> >> processing
> >> >>>> I
> >> >>>> need?
> >> >>>>
> >> >>>
> >> Aaron
> >>
> >> One way to make the code macro recordable/callable is to make sure all
> gui
> >> components (check boxes, options, etc.) are in a "GenericDialog".  If
> you
> >> look at the FFTJ_.java file you can see several different types of
> dialog
> >> boxes being used.  There is a "GenericDialog" as well as the
> >> "DisclaimerWindow" and the "OutputFrame".  In the screen shot you
> >> attached,
> >> the "DisclaimerWindow" and the "OutputFrame" can be seen.  These are a
> >> problem because they are not implemented in a way that communicates with
> >> the Macro framework.
> >>
> >> So my approach to make it recordable is to not show "DisclaimerWindow"
> and
> >> "OutputFrame" and place the options that were in the "OutputFrame" (Show
> >> real part, show imaginary part, etc.) into the GenericDialog.
> >>
> >> The changes are relatively simple so I put a "non-tested-example" on
> >> GitHub.  If you look into the source code and compare FFTJ_.java to
> >> FFTJ_Scriptable.java you can see the changes that were made.
> >>
> >> https://github.com/bnorthan/RogueImageJPlugins/releases
> >>
> >> I use Eclipse but one suggestion I've seen (if you are interested in
> >> making
> >> changes to plugin java code) is to use Fiji and the *Plugins>Compile and
> >> Run *option.  Easier to get started with I think.
> >>
> >> --
> >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >>
> >
> >
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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