Skip to content

Spacing transform does not update transformed image meta dictionary? #6831

Closed Answered by KumoLiu
agaldran asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @agaldran, thanks for your interest here.

  • First, pixdim should also be updated after Spacing, I think it's a bug here, so I will create an issue for it.
  • You can also use spaced_data_dict['image_meta_dict']["affine"] to get the new affine which contains the pixdim information.
  • When you use non-positive values, the transform will use the corresponding components of the original pixdim, which is computed from the affine matrix of the input image, so it will return the original voxel size, which is expected.
    pixdim: output voxel spacing. if providing a single number, will use it for the first dimension.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by agaldran
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants