ShapeWorks
ShapeWorks copied to clipboard
DeepSSM Image-based Registration Problems
There are few issues to the image-based registration (because we are assuming we don't have access to ground truth surfaces during inference) process followed for evaluation:
- Function:
get_image_registration_transform
- Translation transform crashes here:
itk_transform = SimpleITK.TranslationTransform()
- The code should be changed to:
# Get transform matrix
parameter_map = result_transform_parameters.GetParameterMap(0)
transform_params = np.array(parameter_map['TransformParameters'], dtype=float)
if transform_type == 'rigid':
itk_transform = SimpleITK.Euler3DTransform()
elif transform_type == 'similarity':
itk_transform = SimpleITK.Similarity3DTransform()
elif transform_type!= 'tranlation':
print("Error: " + transform_type + " transform unimplemented.")
itk_transform.SetParameters(transform_params)
itk_transform_matrix = np.eye(4)
itk_transform_matrix[:3,:3] = np.array(itk_transform.GetMatrix()).reshape(3,3)
if transform_type != 'translation':
itk_transform_matrix[-1,:3] = np.array(itk_transform.GetTranslation())
else:
itk_transform_matrix[-1,:3] = transform_params.T
-
Should we expose other parameters for image registration to the users? This registration might require some parameter tuning for other complex anatomies.
-
'rigid' is hardcoded here, so it always applies 'rigid' transformation even when others transform types are passed.
-
As per ITK documentation:
- Rigid (itk::Euler3DTransform) applies a rotation and translation to the space given 3 euler angles and a 3D translation. Rotation is about a user specified center.
- Similarity (itk::Similarity3DTransform) applies a rotation, translation and isotropic scaling to the space So do we need to call all three transforms as done in 'groom_val_test_images()' Lines: 396, 409, 422 ?