-
Notifications
You must be signed in to change notification settings - Fork 47
Understanding the output space of Seg3D Segmentation Masks #371
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
Comments
Seg3D is converting the data from the native axes into its coordinate system, with is axes aligned to RAS. In this example it would move the origin (not the center) to a different corner of the volume. For RAS with identity axes, this would be the most left, posterior, and inferior point and the axes would be along right, anterior, superior directions. Does that help? There is an open issue to handle these off-axis data better. #365 |
Hi @jessdtate thanks for the response. Just wondering, is there a principled way then for... "remapping" this back to the space of the image that was fed into Seg3D? This seems like it could be very error prone (for me) and wanted to make sure I'm handling the way that Seg3D is transforming correctly, so I can remap everything back to where my analysis takes place. |
We are working to make this a more robust and integrated part of the Seg3D, but there are a couple workarounds. one is to transform before importing into seg3D. The other is to try to reapply the transform that you pulled the nfti header to the seg3D output. @ChantelC @Sumientra have a way that uses Slicer 3D, but it could be similarly done in python or matlab. Here is a description from @Sumientra: Open Slicer |
I was hoping to get some clarification that the user Manual doesn't have.
My Data Setup
I am working with a post-surgical T1 MRI. The post T1 contains a region that is ablated which I would like to create a segmentation for. I noticed that all the segmentations are saved as the
.nrrd
files, which contains a binary mask volume and then a corresponding vox2ras transform matrix.However, the vox2ras transform matrix is now identity, suggesting that seg3d saved the output in a different space then the input files.
What I "need"
What I am trying to get is a
.nrrd
mask that when loaded in say... python, or matlab and overlays on the corresponding.nifti
file it works. If I need to apply any transformation then that's fine, but I'm not exactly sure how seg3d transforms the image when it is read in, such that I can reproduce the same mapping.Are you able to elaborate how seg3d writes out the final
.nrrd
mask segmentation?Example
I ran seg3D on an image and I got this output:
while the output of
mri_info
for my nifti image that was fed in is:So, while the dimensions of the image and mask line up (e.g. 256 x160 x256), the vox2ras and ras2vox and "centers" seem off, and I'm not exactly sure if/how seg3d does some recentering and/or rotations and/or some flips?
Let me know if I can clarify.
The text was updated successfully, but these errors were encountered: