Login  Register

Re: Mac vs Windows VirtualStack behaviour

Posted by Wayne Rasband-2 on Jun 26, 2019; 3:27am
URL: http://imagej.273.s1.nabble.com/Mac-vs-Windows-VirtualStack-behaviour-tp5022264p5022274.html

> On Jun 25, 2019, at 5:56 PM, otills <[hidden email]> wrote:
>
> I am using a Python script to load a list of .tif files from a .txt list and
> to display these as a Virtual Stack.

Have you tried using the File>Import>Stack From List command? With one line of code you can load files from a list and display them as a virtual stack.

   IJ.run("Stack From List...", "open=/path/to/List.txt use”);

-wayne


>
> for f in filtFiles:
>   if vs is None:
>   imp = IJ.openImage(f)
> vs = VirtualStack(imp.width, imp.height, None,"/")
> vs.addSlice(f)
> imPlus = ImagePlus("Stack from subdirectories", vs)
> print imPlus
> imPlus.show()
>
> I know that the file list import part of the code is working fine as the
> following successfully opens and displays an image:
> imp = IJ.openImage(filtFiles[0])
> imp.show()
>
> The really strange thing here is that on Macs this same script works
> absolutely without issue. However, on PCs I get a blank stack loaded with
> the text 'File not found: ....' on each frame. The file path appears fine as
> IJ.openImage with precisely the same file path works.
>
> What am I missing?
>
> Thanks!

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