NOTICE! This is a static HTML version of a legacy Fiji BugZilla bug.

The Fiji project now uses GitHub Issues for issue tracking.

Please file all new issues there.

Bug 761 - ImageJ macro getDirectory function fails when using SCIFIO for image I/O
ImageJ macro getDirectory function fails when using SCIFIO for image I/O
Status: RESOLVED FIXED
Product: Fiji
Classification: Unclassified
Component: Bio-Formats
unspecified
Macintosh Mac OS
: P3 normal
Assigned To: ImageJ Bugs Mailing List
Depends on:
Blocks:
 
Reported: 2014-06-06 07:48 CDT by Graeme Ball
Modified: 2014-06-09 11:35 CDT
2 users (show)

See Also:


Attachments
Screenshot of getDirectory() macro code working in ImageJ, failing with Fiji/SCIFIO (72.86 KB, image/jpeg)
2014-06-06 07:51 CDT, Graeme Ball

Description Graeme Ball 2014-06-06 07:48:55 CDT
The following ImageJ macro code should print the directory for an open image:-

imageName = getTitle();
dir = getDirectory("image");
print(dir);

This fails using Fiji, which recently prompted me to use SCIFIO for all image I/O if I am not mistaken. When I use vanilla ImageJ it works fine, and if I un-tick,
  Edit->Options->Use SCIFIO when opening image files
it also works fine.

Apologies if I have not categorised this bug correctly (could not see a SCIFIO category), or if I should've reported it elsewhere. I suspect it does mean a lot of macros are likely to fail using Fiji with default options though.

Graeme

PS. screenshot attached
Comment 1 Graeme Ball 2014-06-06 07:51:47 CDT
Created attachment 157
Screenshot of getDirectory() macro code working in ImageJ, failing with Fiji/SCIFIO
Comment 2 Johannes Schindelin 2014-06-06 10:34:12 CDT
I can reproduce the problem. Intermediate analysis: imp.getOriginalFileInfo() returns null. Will keep you posted.
Comment 3 Mark Hiner 2014-06-09 11:35:44 CDT
Johannes kindly fixed this in this commit:
https://github.com/imagej/imagej-legacy/commit/62a577d18eacfa51bc17a703cc604c6631c94749

It's already uploaded to Fiji, so if you update to the latest version your macro code should work now.

Thanks for reporting this Graeme! Thanks for fixing it Johannes!