glencoesoftware / raw2ometiff

Raw format to OME-TIFF converter
GNU General Public License v2.0
46 stars 20 forks source link

IllegalArgumentException in PyramidFromDirectoryWriter #66

Closed vladpopovici closed 3 years ago

vladpopovici commented 3 years ago

Hello,

I try to use the latest bioformats2raw + raw2ometiff pipeline. First step works smoothly,

bioformats2raw --log-level=ERROR --downsample-type=GAUSSIAN \
    --fill-value=255 --max_workers=12 --resolutions=12 --progress \
    HE.mrxs HE-raw

and produces the expected output folder:

    HE-raw
    ├── .zattrs
    ├── .zgroup
    ├── 0
    │   ├── 0
    ...
    ├── 1
    │   ├── 0
    ...
    └── OME
        └── METADATA.ome.xml

However, the 2nd step,

raw2ometiff HE-raw HE2.ome.tiff 

fails:

Exception in thread "main" picocli.CommandLine$ExecutionException: Error while calling command (com.glencoesoftware.pyramid.PyramidFromDirectoryWriter@2db7a79b): java.lang.IllegalArgumentException: 0 must be non-null and strictly positive.
    at picocli.CommandLine.executeUserObject(CommandLine.java:1792)
    at picocli.CommandLine.access$900(CommandLine.java:145)
    at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2150)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2144)
    at picocli.CommandLine$RunLast.handle(CommandLine.java:2108)
    at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:1968)
    at picocli.CommandLine.parseWithHandlers(CommandLine.java:2349)
    at picocli.CommandLine.parseWithHandler(CommandLine.java:2284)
    at picocli.CommandLine.call(CommandLine.java:2560)
    at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.main(PyramidFromDirectoryWriter.java:210)
Caused by: java.lang.IllegalArgumentException: 0 must be non-null and strictly positive.
    at ome.xml.model.primitives.PositiveInteger.<init>(PositiveInteger.java:48)
    at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.initialize(PyramidFromDirectoryWriter.java:718)
    at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.call(PyramidFromDirectoryWriter.java:227)
    at com.glencoesoftware.pyramid.PyramidFromDirectoryWriter.call(PyramidFromDirectoryWriter.java:97)
    at picocli.CommandLine.executeUserObject(CommandLine.java:1783)
    ... 9 more

I tried the latter command with some parameters, but without success. I wonder whether I did something wrong or missed something? (The same pipeline worked with 0.2* version of the tools.) If you have suggestions for patching the code, I can try them out.

Thanks a lot for all your efforts,

Vlad

melissalinkert commented 3 years ago

@vladpopovici does the raw2ometiff step work if you run bioformats2raw without the --resolutions=12 option?

vladpopovici commented 3 years ago

@melissalinkert Thanks, it worked! May I kindly suggest adding some warning messages to bioformats2raw regarding the depth of the generated pyramid? All the best, V.