Login  Register

Re: Opening Stack with ImageJ and BioFormats

Posted by Stein Rørvik on Oct 29, 2019; 7:22pm
URL: http://imagej.273.s1.nabble.com/Opening-Stack-with-ImageJ-and-BioFormats-tp5022585p5022614.html

I don't understand why spaces in labels are no longer allowed in this case?
Spaces should be valid in filenames for all the relevant operating systems in use for ImageJ.

It would make more sense to disallow the colon character ":" in addition to forward "/" and also backward "\" slashes, to avoid problems with the image title to filename conversion.

Stein

-----Original Message-----
From: ImageJ Interest Group <[hidden email]> On Behalf Of Wayne Rasband
Sent: 29. oktober 2019 16:40
To: [hidden email]
Subject: Re: Opening Stack with ImageJ and BioFormats

> On Oct 28, 2019, at 5:19 AM, Herbie <[hidden email]> wrote:
>
> Dear experts,
>
> a current discussion here on the ImageJ-list leads me to post a question about opening stacks either with "Plain ImageJ" or by using "Bio-Formats Importer" from plain ImageJ.

This bug is fixed in the latest ImageJ daily build (1.52s1). The “Stack to Images” command no longer uses the slice label as the file name if it contains a forward slash or space.

-wayne

> Attached please find a test-stack consisting of two color channels.
>
> 1. "Plain ImageJ"
> (Copy the following macro code lines to an empty macro window "Plugins
> >> New >> Macro" and run it.) ///// open(""); // please open the
> test-stack run("Stack to Images"); ///// I get two images with titles:
> "confocal-series_2Ch-0001"
> "confocal-series_2Ch-0002"
>
> 2. "Bio-Formats Importer" from plain ImageJ (Copy the following macro
> code lines to an empty macro window "Plugins >> New >> Macro" and run
> it.) ///// f=File.openDialog(""); // please open the test-stack
> run("Bio-Formats Importer", "open="+f+" color_mode=Default
> rois_import=[ROI manager] view=[Standard ImageJ]
> stack_order=Default"); run("Stack to Images"); ///// (Please take care
> of possible line breaks introduced by the mailer.) I get two images
> with titles:
> "c:1/2 - confocal-series_2Ch"
> "c:2/2 - confocal-series_2Ch"
>
>
> The latter images appear in the Mac-Finder, when saved as TIF, with file names:
> "c/1/2 - confocal-series_2Ch.tif"
> "c/2/2 - confocal-series_2Ch.tif"
>
> For magic reasons the latter image files are correctly opened on my Mac by using the macro:
> (Copy the following macro code lines to an empty macro window "Plugins
> >> New >> Macro" and run it.) ///// f=File.openDialog(""); // please
> open one of the result images open(f); ///// I get the images opened
> by plain ImageJ with titles:
> "c:1:2 - confocal-series_2Ch.tif"
> "c:2:2 - confocal-series_2Ch.tif"
>
> This may be judged as being nice but I judge it highly confusing.
> From my point of view the prefix introduced by "Bio-Formats Importer" appears being far from reasonable.
>
> Thanks for reading and testing!

--
ImageJ mailing list: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fimagej.nih.gov%2Fij%2Flist.html&amp;data=02%7C01%7Cstein.rorvik%40sintef.no%7C2f6eb7e3b7a7468899b208d75c8689fb%7Ce1f00f39604145b0b309e0210d8b32af%7C1%7C0%7C637079605220643687&amp;sdata=viQV0XBCFhgt0e%2FnziV%2BUMMxn%2BfWjhC%2FlXXrkYkYeUw%3D&amp;reserved=0

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