<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Emma,<div><br></div><div>Please keep the conversation on the email list as others</div><div>might have similar questions. </div><div><br></div><div>You're getting expected behavior based on what you're</div><div>telling me. I assume your sparse displacement field is </div><div>actually a "dense" displacement field with sparse non-zero </div><div>entries (at least that's the way the filter sees it). Fortunately,</div><div>there's an easy work-around. I put an option in the filter to</div><div>specify a confidence image which can be used to spatially </div><div>vary the weighting of individual displacement vectors. </div><div><br></div><div>filter->SetConfidenceImage( confidenceImage );</div><div><br></div><div>So, in your case, you would define the confidence image as an</div><div>image with a non-zero constant value (let's say '1' since only </div><div>the relative weighting matters) at the voxels that have non-zero </div><div>displacements. THat should give you what you need.</div><div><br></div><div>Nick</div><div><br></div><div><br></div><div><br></div><div><br></div><div>The filter is treating your zer</div><div><br></div><div><div><div>On Apr 17, 2013, at 11:16 AM, Emma Saunders <<a href="mailto:emmasaunders123@gmail.com">emmasaunders123@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr">Hi Nick,<div><br></div><div style="">Thanks for pointing me in the correct direction of the test.</div><div style=""><br></div><div style="">I am new to ITK, would you kindly offer some advice w.r.t itkDisplacementFieldToBSplineImageFilter.h</div>
<div style=""><br></div><div style="">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</div>
<div style=""><br></div><div style="">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,</div>
<div style=""><br></div><div style="">Would you be-able to clarify that my expectation of this filter are correct or offer any other alternatives for vector field interpolation?</div><div style=""><br></div><div style="">Kind regards</div>
<div style=""><br></div><div style="">Emma</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 16, 2013 at 8:31 PM, Nick Tustison <span dir="ltr"><<a href="mailto:ntustison@gmail.com" target="_blank">ntustison@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Did you look at the test?<br>
<br>
ITK/Modules/Filtering/DisplacementField/test/itkDisplacementFieldToBSplineImageFilterTest.cxx<br>
<div><div class="h5"><br>
<br>
<br>
On Apr 16, 2013, at 2:47 PM, Emma Saunders <<a href="mailto:emmasaunders123@gmail.com">emmasaunders123@gmail.com</a>> wrote:<br>
<br>
> Hi all,<br>
><br>
> could anyone point me towards a working example which utilizes:<br>
><br>
> DisplacementFieldToBSplineImageFilter<br>
><br>
> Kind regards<br>
><br>
> Emma<br>
</div></div>> _____________________________________<br>
> Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br>
</blockquote></div><br></div>
</blockquote></div><br></div></body></html>