-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Modify pixdim
to original_pixdim
in meta dict
#6840
Comments
Hi @KumoLiu , I'm working on this issue with @slicepaste and @einsyang723. We would like to clarify the meaning of |
Hi @IamTingTing, this refers to the "original image" before any operations are performed. From your example: "We have an image that becomes a second image after spacing, and then a third image after spacing again," it specifically means the pixdim of the first image, before any spacing adjustments. And BTW to be simple, we can only update the |
Hi @KumoLiu , Currently,
Perhaps
It may be more intuitive as both parameters follow the same pattern, instead of updating |
Hi @slicepaste, yes we can follow the same structure. |
According to the issue, this PR addresses on the meta dictionary `data['pixdim']` of NIfTI images does not update after applying the `spacing` or `spacingd`. To align with `affine`, we update `data['pixdim']` and keep the original metainfo in `data['original_pixdim']`. Additionally, this PR also update the metainfo `key_{meta_key_postfix}['pixdim']` in NIfTI images, consistent with `spaced_data_dict['image_meta_dict']['pixdim']` in issue Project-MONAI#6832. Signed-off-by: Wei_Chuan, Chiang <[email protected]> Co-authored-by: einsyang723 <[email protected]> Co-authored-by: IamTingTing <[email protected]>
Is your feature request related to a problem? Please describe.
Follow up of #6832, after
Spacing
, the originalpixdim
is not modified in meta dict, which may cause some confusion.Describe the solution you'd like
Would be better to update it to
original_pixdim
.Similar to
affine
.MONAI/monai/data/image_reader.py
Lines 279 to 281 in 8e99af5
The text was updated successfully, but these errors were encountered: