Join GitHub today
Dipy.tracking.utils.target affine parameter is misleading #351
The prototype of the "target" function specifies affine=None, so we can skip giving the affine transform. However, not giving it causes a problem when the "target" function calls _mapping_to_voxel, because that function expects either a defined affine or a defined voxel_size. Since both of them are set to None in that specific use case, the function will fail.
Target should either make it mandatory to send an affine (be it the identity matrix), or give _mapping_to_voxel the identity matrix, or have a way to specify the voxel_size parameter.