[Insight-developers] For your consideration -- enhanced itkWarpImageFilter checked in -- suggestions for further tests?

Bradley Lowekamp blowekamp at mail.nih.gov
Thu Mar 19 10:11:21 EDT 2009


I would very much suggest a test for streaming, as it appears the  
filter supports it.

At least two things should be check in the streaming test.

1) The output is correct
2) The pipeline is executed correctly

To verify the pipeline is actually being streamed and not executed  
extra times, you can use a itkPipelineMonitorFilter which in in  
Testing/Code/IO. Just place it between the inputs and the filter to be  
tested and also after the output. Drive he pipeline with an  
itkStreamingImageFilter. Then verify the recorded information in the  
monitors.

Most things that are not tested do not work. Streaming in not testing  
in most filters.

Please let me know if you have any questions about using the monitor  
or the best ways to test streaming :)

Brad

On Mar 18, 2009, at 3:45 PM, kent williams wrote:

> 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.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at: http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers

========================================================
Bradley Lowekamp
Lockheed Martin Contractor for
Office of High Performance Computing and Communications
National Library of Medicine
blowekamp at mail.nih.gov


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/mailman/private/insight-developers/attachments/20090319/c40ac21a/attachment.htm>


More information about the Insight-developers mailing list