-
Notifications
You must be signed in to change notification settings - Fork 15
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
Updates for shape injection and surf processing of injected surfaces #374
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- splits into different rules for extracting the boundary, and getting distances to src/sink masks - those new rules now produce surface maps (for easier introspection), which are passed along to the laplace beltrami rule - the dentate AP src in bbhist hemi-L was problematic with existing approach, since the PD src/sink were always closer than the AP src, so no vertices were being labelled with AP src. - in this version, we do things a little different: 1. AP and PD are done independently now 2. Instead of nearest neighbor, we use a distance threshold, which is defined based on a signed distance transform of the mask, mapped to the surface. 3. Actually there is a minimum distance, and maximum distance, along with the minimum number of vertices required in the src/sink. The threshold is swept until the desired number is reached, to deal with cases such as the above. - TODO: the get_boundary_vertices script could be further improved to perform connected components and picking the largest one, to avoid being affected by holes or other defects.. - TODO: the laplace beltrami solver doesn't take as long to run now that I am decimating alot, but if we want to further optimize things, I think the step of altering the laplacian based on the boundary conditions, after it has been made a sparse matrix, is where the inefficiency lies (based on profiling). Could try to avoid setting those weights in the first place instead of setting it after the fact.. - NOTE: solve_laplace_beltrami_open_mesh() is kept as is (except for some logging statements)
- required adding a label wildcard to the dsegtissue and upsampled_ref files - adds bbhist template and atlas files too (only locally for now)..
- updated template upenn tissue dseg to include DG (only local currently) - TODO add rule, used: c3d tpl-upenn_desc-DGtissue_dseg.nii.gz -retain-labels 1 2 -as DG -binarize -popas MASK -push DG -shift 8 -push MASK -multiply tpl-upenn_desc-hipptissue_dseg.nii.gz -maximum -o tpl-upenn_desc-hippdentate_dseg.nii.gz - downsampling for greedy template shape reg - dilate dentate pd src/sink (not used yet) - enforce det=1 for template shape reg moments (was flipping) - adjust sdt dist thresholds to get upenn-injected labels working (will need to customize these based on application) - adjust trimming for upsampled coords ref (was cutting off surf) - adjust decimation
percentile-based for AP, and firstminima for PD
updated upenn dseg is uploaded to osf now, so I will merge this now to move things along.. Will see if I can try to get the updated src/sink labels and new gyrification done before I am travelling tomorrow.. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR makes changes to injection and surface processing for dealing with native surf with nnunet + injection.
files
currently)
TODO:
c3d tpl-upenn_desc-DGtissue_dseg.nii.gz -retain-labels 1 2 -as DG -binarize -popas MASK -push DG -shift 8 -push MASK -multiply tpl-upenn_desc-hipptissue_dseg.nii.gz -maximum -o tpl-upenn_desc-hippdentate_dseg.nii.gz