Re: selectWindow does not work

Posted by Herbie on
URL: http://imagej.273.s1.nabble.com/selectWindow-does-not-work-tp5022577p5022588.html

Kerstin,

I guess that you didn't remove these *three* lines

imageTitle=File.nameWithoutExtension;
run("Stack to Images");
selectWindow("c:2/3 - "imageTitle" ");

from your code before running

////
nme=split(getTitle(), ".");
run("Stack to Images");
selectImage("c:1/2 - "+nme[0]);
////

The first line of my code removes the file suffix, i.e. ".czi" etc.
Please learn at least the essentials of the ImageJ-macro language:
<https://imagej.nih.gov/ij/developer/macro/macros.html>
<https://imagej.nih.gov/ij/developer/macro/functions.html>

Meanwhile I've posted a request dealing with the naming differences when
using "Plain ImageJ" or "Bio-Formats Importer" for stacks...

Because you are dealing with ".czi"-files you will most likely need the
"Bio-Formats Importer" that creates the "c:1/2 - "-suffix after calling
"run("Stack to Images");". This prefix has nothing to do with the names
of the stacks you are using and there is no need to re-name your stacks
as they come from the microscope (I've never suggested anything alike).

I hope things are a bit more transparent now.

Regards

Herbie

::::::::::::::::::::::::::::::::::
Am 28.10.19 um 08:49 schrieb kefe:

> unfortunately not
> I get the following errors:
>
> Error: "c:2/3 - 191024_xxx" not found in line 8
>        selectImage ( "c:2/3 - " + nme [ 0 <]> ) ;
>
>
> Since I do not understand what exactly you do with those 3 lines I dont know
> what this error means.
> (Sorry I am a total newbie to writing anything)

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