Struggling to identify a coordinate from the original volume to the new resampled euler transform volume (with offset)

I have a volume that I resample using img_center , and a transform matrix = [0.814277854168591, 0.58047530198157, 0, -0.58047530198157, 0.814277854168591, 0, 0, 0, 1] via euler 3d transformation.

I would like to extract a coordinate at [330,117,172] (within array) but in the new resampled_volume however, as the size is the same as the original volume with rotation the coordinate has changed, I can’t find a way to extract the correct position and have tried multiple techniques any advice would be much appreciated :slight_smile:

Hello @Helena,

When working with transformations you need to work with physical points and not indexes into the image array. The relevant image methods are TransformIndexToPhysicalPoint and TransformPhysicalPointToIndex. You start with the indexes, get the physical point, transform that and then get the indexes for the transformed point.

2 Likes

Hello @zivy Thank you for the response i followed the instructions and I still do not get the correct position, unless i inverse the transform but then I do not get the correct transformed volume. I can share the volume file and coordinate information I am trying to extract, maybe i am missing something.

Transforms in ITK transform from moving space to fixed space. To go from fixed to moving you need the inverse.

Yes thank you I worked it out now :blush: