Login  Register

Re: file.rename example

Posted by Herbie on Nov 22, 2018; 9:53pm
URL: http://imagej.273.s1.nabble.com/file-rename-example-tp5021495p5021496.html

Good day Ethan,

the following little demo macro shows that what you want is indeed possible:

newImage("myMiniStack", "8-bit ramp", 256, 256, 3);
path=getDirectory("home")+getTitle()+".tiff";
save(path);
exit();

It saves the demo-stack to your home directory.

Regards

Herbie

::::::::::::::::::::::::::::::::::::::::::::_
Am 22.11.18 um 22:38 schrieb Cohen, Ethan D:

>
> I am trying to save an image stack with the XXX.tiff suffix.
>
> Note I do not use the suffix .tif  (single f), which I use for other files.
>
> If I use saveAs("Tiff"), I get a .tif file.
>
> Is this possible with file.rename?   So far no dice.
>
> Ethan.
>
>
> Ethan Cohen, Ph.D.
> Div of Biomedical Physics, WO62 Rm 1204
> Office of Science and Engineering Labs,
> FDA Center for Devices and Radiological Health
> White Oak Federal Res Ctr.
> 10903 New Hampshire Ave.
> Silver Spring, MD 20993
> Web: http://go.usa.gov/cegV3
> Office: 301-796-2485
> Lab:301-796-2762
> Fax: 301-796-9927
> Cell: 301-538-7544

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