scverse / scverse/spatialdata-tutorials

Confusion of labels and images in labels_shapes_interchangeability.ipynb

Open
#146 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Jupyter Notebook
Stars
67
Forks
26
Avg merge
4m
Merged PRs (30d)
1

Description

I just went through the vectorization/rasterization tutorial.

What I found confusing is that it starts by claiming to convert between shapes and labels:
https://github.com/scverse/spatialdata-notebooks/blob/7ce65b2f8a291fa21fdb1542b91518378726b51d/notebooks/examples/labels_shapes_interchangeability.ipynb#L11

But then, later, shapes are not converted to labels, but to images:
https://github.com/scverse/spatialdata-notebooks/blob/7ce65b2f8a291fa21fdb1542b91518378726b51d/notebooks/examples/labels_shapes_interchangeability.ipynb#L265

I wanted to convert shapes to labels, but it took me a while to realize I needed to set return_regions_as_labels=True.
I imagine that converting from shape to label is needed more often, because then you can use the labels to aggregate. Would it make sense to update the example to conversion into labels instead of images?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Open notebooks/examples/labels_shapes_interchangeability.ipynb and compare the introductory statement near line 11 with the conversion shown near line 265. Check how return_regions_as_labels=True changes the example, then update the notebook text or example so the documented shapes-to-labels behavior is explicit and verify the rendered tutorial is consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.