[Insight-developers] For your consideration -- enhanced itkWarpImageFilter checked in -- suggestions for further tests?
kent williams
norman-k-williams at uiowa.edu
Wed Mar 18 15:45:32 EDT 2009
Thanks to those who helped me do this. Basically, I put the guts of Tom
Vercauteren's
itk::VectorLinearInterpolateNearestNeighborExtrapolateImageFunction into the
WarpImageFilter.
So now, it finds the deformation at a particular voxel in the output by
interpolating at that physical point in the deformation field.
Since it uses an interpolator to get values out of the input image, and
interpolates to find the deformation, the net effect is that the resolutions
of the input, output, and deformation field are independent -- within
reason. If they don't cover the same physical area/volume the results will
be correct but maybe not what you wanted.
I implemented this by comparing the regions of the deformation field and the
output image. If they're not the same, I interpolate the deformations,
otherwise the filter behavior is the same as it was before I started
hacking. It passes the old WarpImageFilter regression test, and a new one I
wrote. I'll watch for failures on the dashboard, but I think it's pretty
clean.
Here's my real question: The test I added is pretty simple minded: I warp
the same image twice, once with a deformation field half the size (with
twice the spacing) as the output image, and one with a full size deformation
field. The deformations are synthetic -- every voxel gets shifted one MM in
all three directions.
This means that in my test I can create an input image, warp it twice, and
compare the images in-memory for equivalence.
Any other test I could imagine, the interpolation makes simple-minded
comparisons of results insufficient because of interpolation. If someone
can suggest other tests -- preferably ones that don't involve checking in
new test data images -- I'd be glad to implement them.
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.
More information about the Insight-developers
mailing list