Thank you for building and sharing this great work!
I noticed this "bug":
When the argument "affine_first" is set to True in RandomAffineElasticDeformation(), the order of the affine and the elastic deformation application should be reversed because the sitk.CompositeTransform expects the reverse order with the back transformation being applied first while in the code the back transformation is the elastic one (bspline_transform) when "affine_first" is True (instead of the affine one).
The lines 183-186 in spatial/random_affine_elastic_deformation.py should be modified from :
if self.affine_first:
combined_transforms = [affine_transform, bspline_transform]
else:
combined_transforms = [bspline_transform, affine_transform]
to :
if self.affine_first:
combined_transforms = [bspline_transform, affine_transform]
else:
combined_transforms = [affine_transform, bspline_transform]
Thank you for building and sharing this great work!
I noticed this "bug":
When the argument "affine_first" is set to True in RandomAffineElasticDeformation(), the order of the affine and the elastic deformation application should be reversed because the sitk.CompositeTransform expects the reverse order with the back transformation being applied first while in the code the back transformation is the elastic one (bspline_transform) when "affine_first" is True (instead of the affine one).
The lines 183-186 in spatial/random_affine_elastic_deformation.py should be modified from :
if self.affine_first:
combined_transforms = [affine_transform, bspline_transform]
else:
combined_transforms = [bspline_transform, affine_transform]
to :
if self.affine_first:
combined_transforms = [bspline_transform, affine_transform]
else:
combined_transforms = [affine_transform, bspline_transform]