ANTsX / ANTsPy

A fast medical imaging analysis library in Python with algorithms for registration, segmentation, and more.
https://antspyx.readthedocs.io
Apache License 2.0
629 stars 161 forks source link

example for mask + points multi-metric registration? #622

Open dyf opened 4 months ago

dyf commented 4 months ago

We have been building a 3D anatomical template for one of our lightsheet systems. We find 3D mask-based alignment does a great job but would like to refine the transform with a set of manually placed XYZ fiducials.

We have been attempting this with ANTsPy, but have been struggling with understanding the correct way to do this from the documentation. Could someone provide an example?

cc @yonibrowning, @sharmishtaa

ntustison commented 4 months ago

Here are some tutorials for pairwise and longitudinal sets of point sets in ANTsR/ANTsPy. Go down to "Fit transform to paired points" and "Velocity flows across point sets".

galenlynch commented 4 months ago

Is there any way to create multi-metric transforms using both paired points and image intensities? I don't see that in these examples. Thanks in advance!

ntustison commented 4 months ago

We do have point-set specific metrics in antsRegistration (ICP, PSE, and JHCT in the help menu). You can see an example of their usage here. However, these are not available in ANTsPy as they haven't demonstrated sufficient utility to migrate over to ANTsPy. We're much more likely to compliment intensity-based segmentation with binary regional masks which can be added as "multivariate extras." If you're wondering specifically about exact landmark matching, that's not really part of the ANTs toolkit (outside of TPS available in the point-set fitting) as these can conflict with the prioritization of diffeomorphic transforms.

galenlynch commented 4 months ago

I see, we are trying to do the same: compliment intensity-based transforms with binary masks, and were wondering if we could layer landmarks on top of that. We would want the paired points to guide the transform in difficult areas as part of the cost function, but not override it.

I haven't been able to get that chicken example to work with paired key points, but most likely that's due to a lack of effort and understanding on my part.

Thanks for explaining the current status to us!