How pixel position changes after sampling ?

1m
Lets suppose, I have a 2D image of spacing value 1.0 with dimension of 512x546.
for this image i have a pixel value of 255 in position (218,141)

after doing a sampling on the 2D image with spacing 1.5 , the dimension becomes 341x364.
Now what will the position of the same pixel value of 255 ?

The documentation should be helpful:
https://itk.org/ITKSoftwareGuide/html/Book1/ITKSoftwareGuide-Book1ch4.html#x38-490004.1
https://itk.org/ITKSoftwareGuide/html/Book2/ITKSoftwareGuide-Book2ch2.html#x17-800002.9

2 Likes

In this links, they calculated using their origin value. In my case, my origin value after sampling is also {0,0}. In that case, how to calculate it?

Origin = [0,0] is a trivial case, which requires even less computation than the case of origin different from [0,0]. Just use 0 instead of examples’ value of origin.