Skip to content

Conversation

@ruuskas
Copy link
Contributor

@ruuskas ruuskas commented Nov 25, 2025

We haven't discussed this previously, but this came up when working with a student. Would you consider merging?

  • select_vertices_in_sensor_range, restrict_forward_to_vertices, restrict_src_to_vertices, and restrict_forward_to_sensor_range now work with volumetric source spaces.
  • added a simple unittest to verify the above

I have checked that all tests still run locally.

- select_vertices_in_sensor_range, restrict_forward_to_vertices, restrict_src_to_vertices, and restrict_forward_to_sensor_range now work with volumetric source spaces.
- added a simple unittest to verify the above
Copy link
Collaborator

@wmvanvliet wmvanvliet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wonderful to see work on volume source spaces! I'm happy to add this.

However, some of this code doesn't really spark joy. My issue is with the pattern of constantly using an if-statement to check whether we have 1 or 2 hemispheres. This branching makes the code somewhat tedious to read and reason about. I would be happier if some of the branching was replaced by code that works on an arbitrary number of hemispheres, so the same code just works regardless of whether we area dealing with a surface or volume source space.

@ruuskas
Copy link
Contributor Author

ruuskas commented Nov 26, 2025 via email

@ruuskas
Copy link
Contributor Author

ruuskas commented Nov 29, 2025

This should now be better and possibly work with arbitrary number of source spaces.

@wmvanvliet
Copy link
Collaborator

Much cleaner!

Copy link
Collaborator

@wmvanvliet wmvanvliet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work @ruuskas. Thanks!

@wmvanvliet wmvanvliet merged commit bbe80ec into AaltoImagingLanguage:main Dec 2, 2025
2 checks passed
@ruuskas
Copy link
Contributor Author

ruuskas commented Dec 2, 2025

Thanks @wmvanvliet!

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