Login  Register

Re: Simple Macro

Posted by Jessica Davis on Jan 27, 2016; 11:51am
URL: http://imagej.273.s1.nabble.com/Simple-Macro-tp5015462p5015470.html

Hi Curtis,

Thank you for your response. When I follow your instructions, and I check
the "Group files with similar names" option and press OK, I receive the
following error:

java.io.FileNotFoundException: E:\File and Library
Storage\Desktop\USERS\Jessica
Davis\Marina\pIL+Psfl-test4_20160126_120201\pIL+Psfl-test4_t0000_w0000_tt0000.tif
(The system cannot find the file specified)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:212)
at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:123)
at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:139)
at loci.common.NIOFileHandle.<init>(NIOFileHandle.java:148)
at loci.common.Location.getHandle(Location.java:324)
at loci.common.Location.getHandle(Location.java:294)
at loci.common.Location.getHandle(Location.java:284)
at loci.common.Location.getHandle(Location.java:274)
at loci.common.Location.checkValidId(Location.java:349)
at loci.formats.ImageReader.getReader(ImageReader.java:173)
at loci.formats.ImageReader.setId(ImageReader.java:832)
at loci.formats.ReaderWrapper.setId(ReaderWrapper.java:651)
at loci.formats.DimensionSwapper.setId(DimensionSwapper.java:293)
at loci.formats.FileStitcher$ExternalSeries.<init>(FileStitcher.java:1264)
at loci.formats.FileStitcher.initFile(FileStitcher.java:921)
at loci.formats.FileStitcher.setId(FileStitcher.java:872)
at loci.plugins.in.ImportProcess.initializeStack(ImportProcess.java:520)
at loci.plugins.in.ImportProcess.execute(ImportProcess.java:147)
at loci.plugins.in.Importer.showDialogs(Importer.java:140)
at loci.plugins.in.Importer.run(Importer.java:76)
at loci.plugins.LociImporter.run(LociImporter.java:78)
at ij.IJ.runUserPlugIn(IJ.java:212)
at ij.IJ.runPlugIn(IJ.java:176)
at ij.Executer.runCommand(Executer.java:136)
at ij.Executer.run(Executer.java:65)
at java.lang.Thread.run(Thread.java:662)

I am not familiar with computer programming language, so I am unsure what
this error means. Each one of my files have similar names but would I need
to change them to a more simple name for this to work?

Kind Regards,

Jessica

On 26 January 2016 at 15:24, Curtis Rueden <[hidden email]> wrote:

> Hi Jessica,
>
> > I am looking for help to write a simple macro to open different single
> > images in the same folder, combine them into a stack, and save the
> > stack under a different name in a different folder.
>
> Try this:
>
> * Press L for Command Finder
> * Check the "Close window after running command" option
> * Type "Record." and press enter to run the Plugins>Macros>Record...
> function
> * Press L again
> * Type "Bio-Formats", down arrow, enter to run the File > Import >
> Bio-Formats command
> * Choose one of your files and press OK.
> * Check the "Group files with similar names" option of the Bio-Formats
> Importer Options dialog box.
> * All your files should open as a single stack
> * Use the File > Save As menu to save the stack to the desired output
> format
> * Now look at your Recorder window. It contains your macro to repeat the
> process. (You can prune out the "Command Finder" lines; they are
> unnecessary for the macro to work.)
>
> Regards,
> Curtis
>
> On Tue, Jan 26, 2016 at 7:40 AM, Jessica Davis <
> [hidden email]>
> wrote:
>
> > Hello everyone,
> >
> > I am looking for help to write a simple macro to open different single
> > images in the same folder, combine them into a stack, and save the stack
> > under a different name in a different folder.
> >
> > The images I want to combine have similar titles. For example:
> > "w000_t000_tt000" , "w000_t000_tt001" , "w000_t000_tt002"... and
> > "w001_t000_tt000" , "w001_t000_tt0001" , "w001_t000_tt002" ...
> >
> > Can this be done?
> >
> > Many thanks.
> >
> > Kind Regards,
> >
> > Jessica
> >
> > --
> >
> > Jessica Davis MSc.
> >
> > Conway Institute of Biomolecular and Biomedical Research,
> > University College Dublin,
> > Belfield, Dublin 4.
> >
> > --
> > ImageJ mailing list: http://imagej.nih.gov/ij/list.html
> >
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--

Jessica Davis MSc.

Conway Institute of Biomolecular and Biomedical Research,
University College Dublin,
Belfield, Dublin 4.

Tel: +353857444220

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