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

use snap_polygons without pia/wm paths #189

Open
tmchartrand opened this issue Feb 26, 2021 · 4 comments
Open

use snap_polygons without pia/wm paths #189

tmchartrand opened this issue Feb 26, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@tmchartrand
Copy link

Describe the use case that is addressed by this feature.
Many cells outside of the IVSCC pipeline (particularly from synaptic physiology) have layer drawings but no pia/wm paths recorded (or paths may be incomplete). The snap_polygons functionality can still be useful to prepare layer polygons for depth calculations, but currently requires the pia/wm path.

Describe the solution you'd like
The pia/wm paths are only required to trim the layer polygons to the bounds of the pia/wm convex hull. This step is not strictly necessary, and can safely be skipped for missing pia/wm. A few other minor tweaks to schemas and error cases etc. are also required.

Describe alternatives you've considered
Any alternative solutions or features you've considered.

Additional context
This is primarily to enable a use case for synaptic physiology that I currently have fully working on my fork.

Do you want to work on this issue?
Yes, will submit PR shortly.

@gouwens
Copy link
Collaborator

gouwens commented Oct 24, 2022

Hey Tom, just looking this issue and associated PR (#191) over - it's true that you don't need pia/wm drawings for snapping the layer polygons, but you do need them for actually running the streamlines function here:


which passes that info to:
def generate_laplace_field(top_line: List[Tuple],

One of the reasons I was looking at this again is that I find myself in a similar situation - I'm pulling layer boundaries out of the CCF atlas volume for full morphology cells, and I need to get pia/wm lines from the layer drawings. I was hoping you had code in the PR to do that. :) But maybe that still needs to be done.

@tmchartrand
Copy link
Author

@gouwens I have code (not in here) that will adapt the streamlines to using layer boundaries rather than pia/wm. I can definitely add it here soon, I'd previously been trying to make the minimal internal changes needed to use the module for that separate code.
In that code don't try to infer the upper boundary of L1, so have to skip L1 cells, but it worked well for synphys cells where we didn't have L1 and rarely had pia/wm drawings.

@gouwens
Copy link
Collaborator

gouwens commented Oct 24, 2022

But you're still using the gradient fields from the streamlines? Or you're using a different method to figure out the paths between layer edges?

@tmchartrand
Copy link
Author

using gradient fields from streamlines, by calling generate_laplace_field directly (essentially rewrote a more flexible run_streamlines).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants