Skip to content

Conversation

@dominikl
Copy link
Collaborator

@dominikl dominikl commented Jun 9, 2025

Proper convert the numpy data type to ome_types PixelType.

@dominikl dominikl requested a review from jburel June 9, 2025 12:13
@jburel
Copy link
Contributor

jburel commented Jun 9, 2025

This is basically the reverse of what has been implemented in ome/omero-py#387
When working on the "registration"
This is what I have been using

PIXELS_TYPE = {'int8': PixelsTypeint8,
               'int16': PixelsTypeint16,
               'uint8': PixelsTypeuint8,
               'uint16': PixelsTypeuint16,
               'int32': PixelsTypeint32,
               'float_': PixelsTypefloat,
               'float8': PixelsTypefloat,
               'float16': PixelsTypefloat,
               'float32': PixelsTypefloat,
               'float64': PixelsTypedouble,
               'complex_': PixelsTypecomplex,
               'complex64': PixelsTypecomplex}

Extracted from https://github.com/ome/omero-py/blob/master/src/omero/gateway/__init__.py#L3830 and adjusted

@dominikl
Copy link
Collaborator Author

dominikl commented Jun 9, 2025

Yes :-) . I know, at some point soon we'll be able to register a zarr without metadata.xml step, but for now I'll need it to test samples from new IDR submissions.

@jburel
Copy link
Contributor

jburel commented Jun 9, 2025

My point was more to create a map since this could potentially be used elsewhere instead of the current implementation with if statement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants