-
Notifications
You must be signed in to change notification settings - Fork 532
[ENH] New WarpPoints interface in algorithms.mesh #889
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
class WarpPointsInputSpec(BaseInterfaceInputSpec): | ||
points = File(exists=True, mandatory=True, | ||
desc=('file containing the point set')) | ||
warp = File(exists=True, mandatory=True, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where does this field come from? different nonlinear registration algorithms store this field in different ways. we should specify which types of fields this tool supports.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting satisfactory results using fields generated with FSL and convertwarp. Therefore, I guess any field written by FSL (fields, not coefficients) should work out. But true, we should specify this.
I'll be checking what other interfaces generate compatible fields (and/or implement filters for those that are somehow direct). Basically, any 4D image with 3 components should be enough.
Points that fall outside the FoV of the image will experiment zero-displacement.
@oesteban - could you please update this PR to be ready for merge or change the title to a WIP? we are going to try and release soon. |
Conflicts: CHANGES nipype/algorithms/mesh.py
Conflicts: CHANGES
I have added a more detailed docstring for the interface. I hope this fulfills the need for a more detailed description of compatible warping fields. |
Conflicts: CHANGES
Conflicts: CHANGES
An interface to Warp vtk meshes from a displacement field. Uses scipy.map_coordinates interpolation.
EDIT: this interface is much faster than fsl.WarpPoints in the sense that the coefficients (for bspline interpolation) are computed only once. Conversely to fsl.WarpPoints, this interface only accepts points in physical space coordinates