Resampled Image Gives Unexpected Shape #1144
-
Hello, I am working with MRI data and have an example image which has shape (384, 300, 32) with pixdim [0.5208333 0.5208333 4.8]. Resampling the image with a Similarly, if I resample that same image to 1mm isotropic, the output shape is (192, 150, 16). Why is the depth now 16? I would expect it to be ~154. I appreciate any help. |
Beta Was this translation helpful? Give feedback.
Answered by
fepegar
Feb 13, 2024
Replies: 1 comment 4 replies
-
Can you please share your image and some code to reproduce?
…On Tue, 13 Feb 2024, 05:02 Samuel L., ***@***.***> wrote:
Hello,
I am working with MRI data and have an example image which has shape (384,
300, 32) with pixdim [0.5208333 0.5208333 4.8]. Resampling the image with a transform
= tio.Resample((1, 1, 4.8)) gives a new image with shape (192, 150, 7). I
expect the depth to remain the same at 32. Why is it now 7? I appreciate
any help.
—
Reply to this email directly, view it on GitHub
<#1144>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADAZVVGM4IHYE2YKJNR7HLTYTLXWXAVCNFSM6AAAAABDF3PKKKVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZWGIYTEMJRGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you try reading the images with TorchIO instead of NiBabel? Have you gone through the tutorials?