Replies: 3 comments
-
thanks for reporting, with float64 it'll be more precise affine_transform = Affine(translate_params=0, padding_mode="zeros", dtype=torch.float64)
|
Beta Was this translation helpful? Give feedback.
-
Thanks @wyli for the reply! The solution that you provided indeed addresses the problem for zero translation. However, when I eventually start using non-zero values I notice higher interpolation error compared to e.g. ITK resampling. I might be wrong though. Is it fair to say that when Any thought or resource/link will help me a lot because I am working on an affine matrix bridge between ITK and MONAI. |
Beta Was this translation helpful? Give feedback.
-
that's an interesting question, coordinate normalization is remapping it to -1 and 1 so that the pytorch resampling backend can understand it I made some tests comparing monai and itkpython MONAI/tests/test_meta_affine.py Lines 163 to 175 in e270741 another related unit tests is Line 110 in 99b9dd7 please let me know if you have specific code examples for your questions, I'm happy to look into them. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Doing an
Affine
transform withtranslate_params=0
leads some kind of interpolation error between the input and the output tensor, which in theory should be identical. When settingmode="nearest"
there is no such error as expected.Code to reproduce:
which gives the following output:
Is this normal? Why is this interpolation artifact created in the first place? Equally puzzling: why some of the cases give zero error?
I am using:
Thank you!
--
xref for our convenience: InsightSoftwareConsortium/ITKElastix#126
Beta Was this translation helpful? Give feedback.
All reactions