I want to apply transformations such as translate, scale, rotation to a given 3D CT image volume (mhd format). For that I have used vtkImageReslice function as below. But the output seems not correctly deformed as expected.
Should I need to set resliceAxes in order to correctly deformed the image volume ? If so how ? or any mistake that I have done here ?
The image header information and the code snippet is given below for your further reference.
A vague suggestion: Could it be that you need to set the correct spacing for the output data of the reslice object according to the applied scaling in transform?
Yes, that is what I meant actually. I am not very fond with scaling volumes and images with VTK, but I can imagine that if you do so, the output parameters for the reslice object needs to fit the performed operations results.
Additionally, if this does not deliver the results you expect, maybe a translation regarding the center of the volume before scaling it is needed, like so:
I have changed the reslice spacing and the origin by mutiply it with the scaling factor as below. Now I think the issue is gone. I assume I do not need to worry about translation and the rotation factors right ?