Posted by
Jacqueline Ross on
Nov 16, 2010; 4:10am
URL: http://imagej.273.s1.nabble.com/Advice-petition-on-learning-java-programming-tp3686421p3686429.html
Hi Stephan,
Thanks for your fast reply. At the moment, all I can do is get the first
2 images to fuse and that image is saved into my "Tiled" folder.
However, that image then needs to be merged with the file called
"bottom" but I get an error then as shown below:
Numeric value expected in run() function
Dialog box title: "Stitching of 2D Images"
Key: "fusion alpha"
Value or variable name" "Linear Blending"
The macro I have recorded is as below;
open("C:\\Documents and Settings\\jros013\\Desktop\\Copy of
test\\top\\top001.tif"); open("C:\\Documents and
Settings\\jros013\\Desktop\\Copy of test\\middle\\middle001.tif");
open("C:\\Documents and Settings\\jros013\\Desktop\\Copy of
test\\bottom\\bottom001.tif"); run("2D Stitching", "first=top001.tif
_use_channel_for_first=[Red, Green and Blue] second=middle001.tif
use_channel_for_second=[Red, Green and Blue] use how=5 create
_fusion=[Linear Blending] fusion=1.50
fused=Fused_top001.tif_middle001.tif compute_overlap x=0 y=0"); run("2D
Stitching", "first=Fused_top001.tif_middle001.tif
use_channel_for_first=[Red, Green and Blue] second=bottom001.tif
use_channel_for_second=[Red, Green and Blue] use how=5 create
fusion=[Linear Blending] fusion=1.50
fused=Fused_top001.tif_middle001.tif compute_overlap x=0 y=0");
saveAs("Tiff", "C:\\Documents and Settings\\jros013\\Desktop\\Copy of
test\\Tiled\\Fused_top001.tif_middle001.tif");
close();
I will also need to change the naming and make it generic so that it
sequentially goes through all of the images in the folders in order and
creates a tiled image from each one. I guess this is what you mean by a
"simple loop"? I'm not sure how to do that for multiple folders. I then
want to create the AVI from those tiled images.
If you can assist with working out what is causing the error, it would
be much appreciated.
Kind regards,
Jacqui
Jacqueline Ross
Biomedical Imaging Microscopist
Biomedical Imaging Research Unit
School of Medical Sciences
Faculty of Medical & Health Sciences
The University of Auckland
Private Bag 92019
Auckland, NEW ZEALAND
Tel: 64 9 373 7599 Ext 87438
Fax: 64 9 373 7484
http://www.fmhs.auckland.ac.nz/sms/biru/-----Original Message-----
From: Stephan Preibisch [mailto:
[hidden email]]
Sent: Tuesday, 16 November 2010 2:03 p.m.
To: 'ImageJ Interest Group'
Cc: Jacqui Ross
Subject: RE: FIJI 2D stitching in a macro
Hi,
you should be able to record a macro that stores what allowed you to
merge it for one timepoint. In the ideal case you simple make a loop
over the 1000 images and it should be fine. At which point are you
stuck?
Nice greetings,
Stephan
> -----Original Message-----
> From: ImageJ Interest Group [mailto:
[hidden email]] On Behalf Of
> Jacqui Ross
> Sent: Montag, 15. November 2010 21:53
> To:
[hidden email]
> Subject: FIJI 2D stitching in a macro
>
> Dear All,
>
> One of our users has acquired time-lapse data on a Nikon BioStation
> that she now wants to merge into a movie. She has acquired 3 images at
> each time point, which can be merged together nicely using the 2D
> Stitch plugin.
>
> However, there are over 1000 sets of images ("top", "middle" and
> "bottom") to be merged.
>
> Is anyone able to let me know how I can put this into a macro? We have
> 3
> data sets of tiff files sequentially named in 3 individual folders,
> top, middle and bottom. The tiling is not straightforward in that it
> is like a zigzag rather than a rectangle. However, the 2D plugin did
> merge the
> 3
> images very well so if we can automate the procedure and obtain the
> merged tiff files for each time point, we can then easily build the
> AVI.
>
> I have looked at the batch processing options but I haven't figured
> out how to select the correct images.
>
> Thanks in advance for any assistance.
>
> Kind regards,
>
> Jacqui
>
> Jacqueline Ross
>
> Biomedical Imaging Microscopist
> Biomedical Imaging Research Unit
> School of Medical Sciences
> Faculty of Medical & Health Sciences
> The University of Auckland
> Private Bag 92019
> Auckland, NEW ZEALAND
>
> Tel: 64 9 373 7599 Ext 87438
> Fax: 64 9 373 7484
>
>
http://www.fmhs.auckland.ac.nz/sms/biru/