ITKElastix
ITKElastix copied to clipboard
use transformix for point transform
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')
With itk.Transform
support, we can use itk.TransformMeshFilter
CC: @N-Dekker
We should target a notebook for this with the transform support of elastix 5.1.0 / ITKElastix 0.16.0.