ilastik / ilastik4ij

ImageJ plugins to run ilastik workflows
MIT License
20 stars 17 forks source link

hdf5 export - filename requires `.h5` extension - should be added automatically, or better error message #122

Open k-dominik opened 7 months ago

k-dominik commented 7 months ago

Currently, when exporting to hdf5, the users are required to give the filename an .h5 extension - without this being clear in the UI somewhere. When a user fails to do so, the only information they get is some java backtrace:

[ERROR] Command errored: Export HDF5
java.lang.IllegalArgumentException: HDF5 export file must have '.h5' suffix
    at org.ilastik.ilastik4ij.io.ExportCommand.run(ExportCommand.java:85)
    at org.scijava.command.CommandModule.run(CommandModule.java:196)
    at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:125)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:64)
    at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:247)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)

Also, the UI there is a file picker. Usually, the file does not exist yet, this also needs to be changed.