[Insight-users] DisplacementFieldToBSplineImageFilter

Karthik Krishnan karthik.krishnan at kitware.com
Thu Apr 18 09:44:38 EDT 2013


RealValueType would mean an image with a datatype of 'double' and not
'float' as you have instantiated.

HTH


On Thu, Apr 18, 2013 at 6:05 PM, Emma Saunders <emmasaunders123 at gmail.com>wrote:

> Hi Nick / all,
>
> 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:
>
>            typedef float PixelType;
>   typedef itk::Image< PixelType, 3 >          ImageType;
>   ImageType::Pointer ConfidenceImage = ImageType::New();
>
>
> And applying appropriate size, index values etc.
>
> and applying via Bspline->SetConfidenceImage(ConfidenceImage)
>
> However an error I receive is "no matching function to:
> :SetConfidenceImage(itk::SmartPointer<itk::Image<float, 3u> >&)’"
>
>
> Output mentions using ::SetConfidenceImage(const itk::Image<typename
> TOutputImage::PixelType::RealValueType,
> itk::DisplacementFieldToBSplineImageFilter<TInputImage,
> TOutputImage>::ImageDimension>*)
>
> 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??
>
> Advice appreciated
>
> Emma
>
>
>
>
>
> On Wed, Apr 17, 2013 at 4:37 PM, Nick Tustison <ntustison at gmail.com>wrote:
>
>> 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
>>>
>>>
>>
>>
>
> _____________________________________
> 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
>
>


-- 
karthik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130418/cdd3d3f7/attachment.htm>


More information about the Insight-users mailing list