Login  Register

Re: Mac vs Windows VirtualStack behaviour

Posted by John Minter on Jun 25, 2019; 10:09pm
URL: http://imagej.273.s1.nabble.com/Mac-vs-Windows-VirtualStack-behaviour-tp5022264p5022265.html

Oliver, I think your problem is the line:

vs = VirtualStack(imp.width, imp.height, None,"/")

The VirtualStack class lists the constructor you used as

VirtualStack(int width, int height, java.awt.image.ColorModel cm,
java.lang.String path)

"/" is not a valid path in Windows

Best Regards,
John

On Tue, Jun 25, 2019 at 5:58 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.
>
> 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!
>
>
>
> --
> Sent from: http://imagej.1557.x6.nabble.com/
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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