glencoesoftware / bioformats2raw

Bio-Formats image file format to raw format converter
GNU General Public License v2.0
77 stars 35 forks source link

Can't remove series from directory structure with `--scale-format-string` #179

Closed LucaMarconato closed 1 year ago

LucaMarconato commented 1 year ago

As suggested in the readme, I am trying to remove the series from the directory structure with the argument --scale-format-string.

The full command I am using is

bioformats2raw data/Xenium_FFPE_Human_Breast_Cancer_Rep1_morphology_mip.ome.tif data.zarr/images/morphology_mip -p --max-workers 16 --no-root-group --no-ome-meta-export --scale-format-string '%2$d/'

Unfortunately I see that .zattrs doesn't fill in the path for the multiscale transformations, leading to the inability for napari-ome-zarr to open the image.

   "datasets" : [ {
      "path" : "",
      "coordinateTransformations" : [ {
        "scale" : [ 1.0, 1.0, 1.0, 0.2125, 0.2125 ],
        "type" : "scale"
      } ]
    }, {
      "path" : "",
      "coordinateTransformations" : [ {
        "scale" : [ 1.0, 1.0, 1.0, 0.425, 0.425 ],
        "type" : "scale"
      } ]
    }, 
...
melissalinkert commented 1 year ago

Thanks, @LucaMarconato. #181 should fix this issue; if you have a chance to test it, we'd welcome any feedback.

giovp commented 1 year ago

@melissalinkert thanks for taking a look at this! I wanted to try out #181 but couldn't install it in dev mode. I could only install it via conda. Could you walk me through the developer installation to check out #181 ?

Thanks!

melissalinkert commented 1 year ago

@giovp : from https://github.com/glencoesoftware/bioformats2raw/pull/181/checks:

bin/bioformat2raw --version should show Version = 0.7.0-SNAPSHOT, indicating that this is a development build. If any of that doesn't work, just let us know.

giovp commented 1 year ago

fantastic, very useful, it works!

 "name" : "Image0",
    "datasets" : [ {
      "path" : "0",
      "coordinateTransformations" : [ {
        "scale" : [ 1.0, 1.0, 1.0, 0.2125, 0.2125 ],
        "type" : "scale"
      } ]
    }, {
      "path" : "1",
      "coordinateTransformations" : [ {
        "scale" : [ 1.0, 1.0, 1.0, 0.425, 0.425 ],
        "type" : "scale"
      } ]
    }, {
      "path" : "2",
      "coordinateTransformations" : [ {
        "scale" : [ 1.0, 1.0, 1.0, 0.85, 0.85 ],
        "type" : "scale"
      } ]
    }, {