Login  Register

Saving data...but how to include a number??

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Saving data...but how to include a number??

octavius
9 posts
Hello everyone,

I have a stack composed of 5535 frames. I would like to convert that stack into images and save each image as follows fov1_0001.tif, fov1_0002.tif till fov1_5535.tif. This is what I have:

n=nSlices();
n=5535;

for (i=1; i<=n; i++)        
{
         a=i;
         b=i+0;
         run("Z Project...", "start="+a+" stop="+b+" projection=[Max Intensity]");
         saveAs("Tiff", "C:\\Users\\blaaa\\bloooo\\weeed\\Images\\fov1_"+04i+".tif");
         close();                
}

However it is incorrect because I get an error message. How do I save it as fov1_0001.tif, fov1_0002.tif till fov1_5535.tif and also how do I convert to images without having to do to that max intensity projection, because my computer crashes if I simply run the stack to images.

Any help and suggestions would be awesome.

Octavius
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

Re: Saving data...but how to include a number??

Cammer, Michael
283 posts
File > Save As > Image Sequence...

_________________________________________
Michael Cammer, Assistant Research Scientist
Skirball Institute of Biomolecular Medicine
Lab: (212) 263-3208  Cell: (914) 309-3270

________________________________________
From: ImageJ Interest Group [[hidden email]] on behalf of octavius [[hidden email]]
Sent: Monday, January 14, 2013 6:39 PM
To: [hidden email]
Subject: Saving data...but how to include a number??

Hello everyone,

I have a stack composed of 5535 frames. I would like to convert that stack
into images and save each image as follows fov1_0001.tif, fov1_0002.tif till
fov1_5535.tif. This is what I have:

n=nSlices();
n=5535;

for (i=1; i<=n; i++)
{
         a=i;
         b=i+0;
         run("Z Project...", "start="+a+" stop="+b+" projection=[Max
Intensity]");
         saveAs("Tiff",
"C:\\Users\\blaaa\\bloooo\\weeed\\Images\\fov1_"+04i+".tif");
         close();
}

However it is incorrect because I get an error message. How do I save it as
fov1_0001.tif, fov1_0002.tif till fov1_5535.tif and also how do I convert to
images without having to do to that max intensity projection, because my
computer crashes if I simply run the stack to images.

Any help and suggestions would be awesome.

Octavius



--
View this message in context: http://imagej.1557.n6.nabble.com/Saving-data-but-how-to-include-a-number-tp5001417.html
Sent from the ImageJ mailing list archive at Nabble.com.

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

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