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

[BUG] add region from selected layer _ for atlas space #103

Closed
SaraMederos opened this issue Jun 21, 2023 · 3 comments · Fixed by #107
Closed

[BUG] add region from selected layer _ for atlas space #103

SaraMederos opened this issue Jun 21, 2023 · 3 comments · Fixed by #107
Assignees
Labels
bug Something isn't working

Comments

@SaraMederos
Copy link

Describe the bug
When attempting to use the "Add Region" feature from the bottom of the region segmentation plugin, an error occurs only when loading the project in the atlas space. The error is reported when trying to run the "Analyze Regions" or "Summarize Volumes" functions. The log error files indicate a ValueError: operands could not be broadcast together with shapes. This might happen if the layers were not generated in the atlas space and were exported from another source.

To Reproduce
Import the project into the atlas space. Import a different layer with a threshold generated outside the atlas space. Try to run "Analyze Regions" after clicking the "Add" button for the external layer.

Expected behaviour
Generation of output files, summarize regions and volumes. As in sample space.

Log file
See attached error file

Additional context
The same issue does not occur if the threshold is generated over layers that were already generated from files existing in the atlas space, which is logical. Alternatively, I can include both approaches in the documentation, so it will be clear that this is not a bug.
I think this last option of specifying how to proceed in case adding from the atlas space is the option. Maybe if trying to add from a region that is not atlas space we just need to include a window advising the layer is not in the atlas space. I will include this details in the documentation.
logErrorFile_AtlasSpace.txt
logErrorFile_AtlasSpace.txt

@SaraMederos SaraMederos added the bug Something isn't working label Jun 21, 2023
@adamltyson adamltyson self-assigned this Jun 21, 2023
@adamltyson
Copy link
Member

Thanks for raising this, to clarify do these two cases work:

  1. Segment a feature in sample space and analyse in sample space
  2. Segment a feature in atlas space and analyse in sample space

And this doesn't:
3. Segment a feature in sample space and analyse in atlas space (or vice versa)

If so, that's expected, but you're right, this should be documented. If either 1. or 2. don't work, then something is broken and I should fix it!

@SaraMederos
Copy link
Author

This is correct. Points 1 and 2 work without any issues. Point 3, on the other hand, does not work (as it shouldn't), but we can address this by implementing a window that displays a message indicating the need to move to the correct space. I will include this information in the documentation to ensure clarity.

@adamltyson
Copy link
Member

Great, thanks for the clarification. The plugin should warn users about this so that they don't get a cryptic error message (and so they don't spend ages segmenting data in the wrong coordinate space)! I'll add something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants