-
Hello, Sorry about the naive question, I am trying to wrap my head around transforms and meta_dicts. Right now I have the following operations:
which returns a shape and voxel sizes of
I am expecting to see approx half the voxels in the Z direction, as the original spacing was 0.75 and I am asking for twice that spacing. For the other directions, nothing should be changed^* . This is what I get:
So, although the number of voxels are as expected, the spacing remains the same. I cannot find any other key in the meta data dictionary that tells me what is the current spacing for this volume. Am I doing something wrong here? ^* not sure about this either but numbers seem to match. Is my understanding correct? It also happens that if I use (0.0, 0.0, 1.5) I get the same result as when I specify the original voxel sizes, is this expected behavior? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @agaldran, thanks for your interest here.
BTW, you can use |
Beta Was this translation helpful? Give feedback.
-
That is very interesting thanks a lot! Expect me to be back in this Q&A in the next weeks, I am finally having some time to dig in MONAI code and I my hat is full of questions :) Cheers, Adrian |
Beta Was this translation helpful? Give feedback.
Hi @agaldran, thanks for your interest here.
pixdim
should also be updated afterSpacing
, I think it's a bug here, so I will create an issue for it.spaced_data_dict['image_meta_dict']["affine"]
to get the new affine which contains the pixdim information.affine
matrix of the input image, so it will return the original voxel size, which is expected.MONAI/monai/transforms/spatial/array.py
Lines 362 to 369 in cb257d2