Skip to content

Got multi-page tiff that works with Dataset.from_images but not with add_layer_from_images #1395

@fm3

Description

@fm3

There appears to be a mismatch between Dataset.from_images and the logic in add_layer_from_images.

This code runs through but yields an unusable dataset with bbox z=1 and dtype=uint48:

        ds = wk.Dataset(f"out", (5,5,5))

        ds.add_layer_from_images(
            images=["input/in.tif"],
            layer_name="color"
        )

I’m also getting this warning:

dataset.py:1520: UserWarning: [INFO] There are dimensions beyond channels and xyz which cannot be read: {'channel': [0, 1, 2, 3, 4, 5, 6, 7, … 2047]}. Defaulting to the first one. Please set allow_multiple_layers=True if all of them should be written to different layers, or set specific values as arguments.

while this works correctly with the same file (usable output dataset 2048³ dtype uint16):

wk.Dataset.from_images(
    input_path="input",
    output_path="out",
    voxel_size=(5,5,5)
)

Talk to me for access to the 17G example image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions