<div dir="ltr">Hi Nick / all,<div><br></div><div style>Thanks for your recent input w.r.t using a Confidence Image with the itk::DisplacementFieldToBSplineImageFilter. I am attempting to use it by creating my own confidence image via:</div>
<div style><br></div><div style><div> typedef float PixelType;</div><div><span class="" style="white-space:pre">        </span> typedef itk::Image< PixelType, 3 > ImageType;</div><div><span class="" style="white-space:pre">        </span> ImageType::Pointer ConfidenceImage = ImageType::New();</div>
</div><div style><br></div><div style><br></div><div style>And applying appropriate size, index values etc.</div><div style><br></div><div style>and applying via Bspline->SetConfidenceImage(ConfidenceImage) </div><div style>
<br></div><div style>However an error I receive is "no matching function to: :SetConfidenceImage(itk::SmartPointer<itk::Image<float, 3u> >&)’"</div><div><br></div><div style><br></div><div style>
Output mentions using ::SetConfidenceImage(const itk::Image<typename TOutputImage::PixelType::RealValueType, itk::DisplacementFieldToBSplineImageFilter<TInputImage, TOutputImage>::ImageDimension>*)</div><div style>
<br></div><div style>Does this require I use a const image, if so I'm having trouble with defining such could someone point me in the right direction of how to create a const image as I can only find documentation w.r.t smartpointer images, or is there something that I have done wrong w.r.t the filter??</div>
<div style><br></div><div style>Advice appreciated</div><div style><br></div><div style>Emma</div><div style><br></div><div style><br></div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Wed, Apr 17, 2013 at 4:37 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">
<div style="word-wrap:break-word">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><div class="h5"><div><br></div><div><div><div>On Apr 17, 2013, at 11:16 AM, Emma Saunders <<a href="mailto:emmasaunders123@gmail.com" target="_blank">emmasaunders123@gmail.com</a>> wrote:</div>
<br><blockquote type="cite"><div dir="ltr">Hi Nick,<div><br></div><div>Thanks for pointing me in the correct direction of the test.</div><div><br></div><div>I am new to ITK, would you kindly offer some advice w.r.t itkDisplacementFieldToBSplineImageFilter.h</div>
<div><br></div><div>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><br></div><div>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><br></div><div>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><br></div><div>Kind regards</div>
<div><br></div><div>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><br>
<br>
<br>
On Apr 16, 2013, at 2:47 PM, Emma Saunders <<a href="mailto:emmasaunders123@gmail.com" target="_blank">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></div></div></div></blockquote></div><br></div>