[Insight-users] DisplacementFieldToBSplineImageFilter

Nick Tustison ntustison at gmail.com
Wed Apr 17 11:37:26 EDT 2013


Hi Emma,

Please keep the conversation on the email list as others
might have similar questions.  

You're getting expected behavior based on what you're
telling me.  I assume your sparse displacement field is 
actually a "dense" displacement field with sparse non-zero 
entries (at least that's the way the filter sees it).  Fortunately,
there's an easy work-around.  I put an option in the filter to
specify a confidence image which can be used to spatially 
vary the weighting of individual displacement vectors.  

filter->SetConfidenceImage( confidenceImage );

So, in your case, you would define the confidence image as an
image with a non-zero constant value (let's say '1' since only 
the relative weighting matters) at the voxels that have non-zero 
displacements.  THat should give you what you need.

Nick




The filter is treating your zer

On Apr 17, 2013, at 11:16 AM, Emma Saunders <emmasaunders123 at gmail.com> wrote:

> Hi Nick,
> 
> Thanks for pointing me in the correct direction of the test.
> 
> I am new to ITK, would you kindly offer some advice w.r.t itkDisplacementFieldToBSplineImageFilter.h
> 
> I have as input to this filter a sparse vector field, 5, 2D slices, each slice is spaced 20 voxels apart, I would like a dense approximation of this field and was under the impression this filter could do that, i.e interpolate between the slices
> 
> When I run the filter however and use bspliner->GetDisplacementField() what returns is something similar to the original, i.e the gaps inbetween are not filled in or interpolated.  I have left the spline order at 3, fitting levels at 5 and control points at 4,
> 
> Would you be-able to clarify that my expectation of this filter are correct or offer any other alternatives for vector field interpolation?
> 
> Kind regards
> 
> Emma
> 
> 
> On Tue, Apr 16, 2013 at 8:31 PM, Nick Tustison <ntustison at gmail.com> wrote:
> Did you look at the test?
> 
> ITK/Modules/Filtering/DisplacementField/test/itkDisplacementFieldToBSplineImageFilterTest.cxx
> 
> 
> 
> On Apr 16, 2013, at 2:47 PM, Emma Saunders <emmasaunders123 at gmail.com> wrote:
> 
> > Hi all,
> >
> > could anyone point me towards a working example which utilizes:
> >
> > DisplacementFieldToBSplineImageFilter
> >
> > Kind regards
> >
> > Emma
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.php
> >
> > 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-users
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130417/1357274f/attachment.htm>


More information about the Insight-users mailing list