Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setting cmap for multiscale image leads to error #360

Closed
LucaMarconato opened this issue Sep 27, 2024 · 1 comment
Closed

setting cmap for multiscale image leads to error #360

LucaMarconato opened this issue Sep 27, 2024 · 1 comment
Labels
bug Something isn't working images 🖼️ Anything related to Images priority: medium

Comments

@LucaMarconato
Copy link
Member

from spatialdata.datasets import blobs
import spatialdata_plot

sdata = blobs()
sdata.pl.render_images('blobs_multiscale_image', cmap='gray')

gives

Traceback (most recent call last):
  File "/opt/miniconda3/envs/ome39/lib/python3.9/site-packages/IPython/core/interactiveshell.py", line 3550, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "<ipython-input-5-97fd56a4e55c>", line 5, in <module>
    sdata.pl.render_images('blobs_multiscale_image', cmap='gray')
  File "/Users/macbook/embl/projects/basel/spatialdata/src/spatialdata/_utils.py", line 261, in wrapper
    return f(*args, **kwargs)
  File "/Users/macbook/embl/projects/basel/spatialdata-plot/src/spatialdata_plot/pl/basic.py", line 476, in render_images
    params_dict = _validate_image_render_params(
  File "/Users/macbook/embl/projects/basel/spatialdata-plot/src/spatialdata_plot/pl/utils.py", line 1909, in _validate_image_render_params
    cmap_length = len(channel) if channel is not None else len(spatial_element.c)
  File "/opt/miniconda3/envs/ome39/lib/python3.9/site-packages/datatree/common.py", line 54, in __getattr__
    raise AttributeError(
AttributeError: 'DataTree' object has no attribute 'c'
@LucaMarconato LucaMarconato added priority: medium images 🖼️ Anything related to Images bug Something isn't working labels Sep 27, 2024
@timtreis
Copy link
Member

#354 duplicate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working images 🖼️ Anything related to Images priority: medium
Projects
None yet
Development

No branches or pull requests

2 participants