Skip to content
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

How to output with the original size? #197

Open
yuanc3 opened this issue Mar 6, 2023 · 2 comments
Open

How to output with the original size? #197

yuanc3 opened this issue Mar 6, 2023 · 2 comments

Comments

@yuanc3
Copy link

yuanc3 commented Mar 6, 2023

The original image will be transformed (Spacingd & CropForegroundd) before being input into the model, so how can it be reshaped to the original size?
For example, "img0035.nii.gz" is (512,512,94), after being transformed, it will be (314, 214, 234).

@tangy5
Copy link
Contributor

tangy5 commented Mar 13, 2023

There is a post transform called "Invertd", you could simply apply it as a posttransform, and it will read the preoprocessing transform parameters and do the reverse automatically. The other choice is to resample manually after getting the segmentation, do a resize using other packages, or Spacingd, cropp, pad etc..

Invertd: https://docs.monai.io/en/stable/transforms.html#invertd

@zjy399
Copy link

zjy399 commented Jan 12, 2024

有一个叫做“Invertd”的后变换,你可以简单地将其应用为后变换,它将读取预处理变换参数并自动执行反转。另一种选择是在获得分割后手动重新采样,使用其他包或 Spacingd、cropp、pad 等进行调整大小。

倒置:https://docs.monai.io/en/stable/transforms.html#invertd

Has this issue been resolved? Can you provide the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants