FileInfoVirtualStack does not return the directory and filename

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

FileInfoVirtualStack does not return the directory and filename

Yamada Hidenao
Hi, everyone, and hope everyone is safe.

I'm trying to get the directory or filename of the FileInfoVirtualStack by
using getDirectory or getFileName(n). However, these functions return
nulls. How can I get the full-path ?I think getDirectory() should return
info[0].directory like getWidth() in FileInfoVirtualStack.
---
FileInfo fi = new FileInfo();
...
FileInfoVirtualStack stack = new FileInfoVirtualStack(fi); // Opened a
stack image correctly.
IJ.showMessage("dir: " + stack.getDirectory()); // Error:
java.lang.NullPointerException
//IJ.showMessage("name: " + stack.getFileName()); //Error
java.lang.NullPointerException


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: FileInfoVirtualStack does not return the directory and filename

Wayne Rasband-2
> On Apr 8, 2020, at 3:42 AM, 岩井 秀直 <[hidden email]> wrote:
>
> Hi, everyone, and hope everyone is safe.
>
> I'm trying to get the directory or filename of the FileInfoVirtualStack by
> using getDirectory or getFileName(n). However, these functions return
> nulls. How can I get the full-path ?I think getDirectory() should return
> info[0].directory like getWidth() in FileInfoVirtualStack.

This bug is fixed in the latest ImageJ daily build (1.52v20).

-wayne

> ---
> FileInfo fi = new FileInfo();
> ...
> FileInfoVirtualStack stack = new FileInfoVirtualStack(fi); // Opened a
> stack image correctly.
> IJ.showMessage("dir: " + stack.getDirectory()); // Error:
> java.lang.NullPointerException
> //IJ.showMessage("name: " + stack.getFileName()); //Error
> java.lang.NullPointerException

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: FileInfoVirtualStack does not return the directory and filename

Yamada Hidenao
Hi, Wayne,

Thank you for updating for this bug.
I tried 1.52v and it works well in my plugin-filter for processing VirtualStack.

PS. I missed my credit in update lists in ImageJ News.

Best regards,
Hidenao Yamada


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