-
Notifications
You must be signed in to change notification settings - Fork 3
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
Empty voxels when bringing back softseg to native space #11
Comments
Wow, that is a strange bug. I would start investigating what happens if you change Then, I would open the warping field and check if there are discontinuities at the location where you "loose" voxels. My gut feeling is that the warping field has some issues which we would need to address. |
@sandrinebedard I'm having a hard time understanding what is the orientation on #11 (comment). Could you please indicate A/P/I/S/R/L in the figure, and also show a view of the spinal cord (maybe overlaid) so we can understand what location in the warping field corresponds to the discontinuity in the segmentation. |
Of course! I just updated #11 (comment)! |
ah! i think i know what this is. The Z component of the warping field (which is a 4D file) is "pushing" a voxel from outside (ie: defined as 0) inside the segmentation. A way to overcome this edge effect is simply by padding with mirroring the image when estimating the transformation. Alternatively (easier) you can get rid of all edge slices. |
Ahh I see!
Getting rid of the edge slices may be fine for T1w, but for T2star (same thing for MTS data and dwi), removing 2 slices is a bit extreme since we don't have a lot. I can try padding! |
How much padding did you do? I would start with only one slice at both extremities. |
I tested out with 2 slices at both extremities and then 1 : one slice at both extremities is what worked the best for regsitration and resolved the edge effect for the images I tested out! The only thing I need to test out is for this case where 2 slices were affected if padding with 1 slice at both extremities resolves the problem! |
Have you encountered this in the past, @jcohenadad? I ask because I'm wondering if this behavior is common enough that we might want to check for and/or document it on SCT's end. (e.g. in |
Description
For #2, we want to bring back the softseg to the native space due to reasons explained here.
Right now, we use
sct_apply_transfo
with linear interpolationcontrast-agnostic-softseg-spinalcord/process_data.sh
Line 187 in 88fbfc3
However, the resulting softseg sometime have empty voxels at the extremity of the segmentation while in T2w space, the segmentation is complete:
I also openned it in fsleyes to make sure it wasn't just the threshold of 0.5 appplied in the qc report:
(sub-amu01_acq-T1w_MTS)
The softseg in T2w space:
This doesn't happen all the time, I am wondering if this won't be a problem when we have all the manual segmentations since registration is based on the segmentation and slices in the extremity aren't always good.
This is the segmentation with stc_deepseg_sc used here for sub-amu01_acq-T1w_MTS:
The text was updated successfully, but these errors were encountered: