ANTsX / ANTsR

R interface to the ANTs biomedical image processing library
https://antsx.github.io/ANTsR
Apache License 2.0
127 stars 35 forks source link

ENH: Simulate B-spline/Exp displacement fields. #307

Closed ntustison closed 4 years ago

ntustison commented 4 years ago

Hey @stnava ,

Following up on our earlier conversation about wrapping some of the ITK/ANTs B-spline functionality in ANTsR, I thought I'd start with a project we discussed awhile ago---specifically, adding simulated displacement fields. I wrote the SimulateDisplacementField program which wraps both B-spline and Exponential ITK-based classes.

ntustison commented 4 years ago

Just a note that this compilation is going to fail because I need to update the ANTs cage in ANTsRCore.

ntustison commented 4 years ago

Okay, @stnava , I believe this is ready to go. If it fails, based on what I've seen, it's because the build is not incorporating the recent ANTs tag update in ANTsRCore.

This commit incorporates simulated displacement fields (bspline and exponential) and it templates the b-spline scattered data filter so one can fit 1/2/3/4-D curves, 2/3/4-D scalar fields, and 2/3-D displacement fields. The former is in the simulateDisplacementFields function and the latter is in fitBsplineObjectToScatteredData.

ntustison commented 4 years ago

Thanks for pushing this @stnava . Hey, @jeffduda , just wanted to tag you in this since you've used this filter in the past. Note that I didn't template the B-spline surface option because 2-D vector images aren't templated for 3 components in ANTsRCore. However, if there is a demand, it would be really easy to add as the fitting code is already in place.

muschellij2 commented 4 years ago

I think this might need a minimum version update for ANTsRCore because I was getting ImageDuplicator errors using an install from a week or 2 ago.

ntustison commented 4 years ago

https://github.com/ANTsX/ANTsRCore/pull/117