Discussion:
[ITK-users] How to use smart pointer in WrapITK?
Matt McCormick
2017-07-31 14:57:58 UTC
Permalink
Hi Nick,

Thanks for bringing this up -- you found a bug. The method should be
returning a raw pointer instead of a SmartPointer.

Please review this patch, which will address the issue:

http://review.source.kitware.com/#/c/22546/

Thanks,
Matt

On Sat, Jul 29, 2017 at 10:58 AM, Nick Cullen via Insight-users
I guess my work around for now is to add this function to
const BiasFieldControlPointLatticeType*
GetBiasFieldControlPointLatticeImage() const
{
return static_cast<const BiasFieldControlPointLatticeType*>(
this->m_LogBiasFieldControlPointLattice );
}
On Saturday, July 29, 2017 10:35 AM, Nick Cullen via Insight-users
When I run itk.N4BiasFieldCorrectionImageFilter, I want to get the control
correcter.GetLogBiasFieldControlPointLattice()
It returns a SmartPointer: <Swig Object of type 'itk::SmartPointer<
itk::Image< itk::Vector< float,1 >,2 > > *' at 0x15e775300>
Can I get the actual image from this in WrapITK? Is this happening because I
haven't wrapped another class - specifically
itk::BSplineScatteredDataPointSetToImageFilter, which is where the
LogBiasFieldControlPointLattice comes from?
Thanks!!
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/mailman/listinfo/insight-users
_____________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
http://public.kitware.com/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://public.kitware.com/mailman/listinfo/insight-users

Loading...