ITKElastix icon indicating copy to clipboard operation
ITKElastix copied to clipboard

use transformix for point transform

Open FZH1802 opened this issue 2 years ago • 2 comments

Hello ITKElastix team,

Thank you very much for your useful library,I want to transform point set by transformix, but when i run the code and wany to load the file "outputpoints.txt", i fund the file is empty. My code is as follows.

transformix_object = itk.TransformixFilter.New(moving_image) transformix_object.SetFixedPointSetFileName('./data/frLeftBorderT.txt') transformix_object.SetTransformParameterObject(result_transform_parameters_coarse) transformix_object.SetLogToConsole(True) transformix_object.SetOutputDirectory('./transformix/') transformix_object.UpdateLargestPossibleRegion()

Results of Transformation

-- Bug? -- Output is saved as .txt file in outputdirectory.

The .GetOutput() function outputs an empty image.

output_transformix_mask = transformix_object.GetOutput() moving_left_line = np.loadtxt('./transformix/outputpoints.txt', dtype='str')[:,27:29].astype('float64')

FZH1802 avatar Sep 25 '22 03:09 FZH1802

With itk.Transform support, we can use itk.TransformMeshFilter

CC: @N-Dekker

thewtex avatar Oct 17 '22 14:10 thewtex

We should target a notebook for this with the transform support of elastix 5.1.0 / ITKElastix 0.16.0.

thewtex avatar Feb 15 '23 10:02 thewtex