Re: [ITK-users] How to use smart pointer in WrapITK?

Matt McCormick <[email protected]>
Newsgroups gmane.comp.lib.itk.user
Message-ID <CALzTN-S-RagHq7-sfRnpbr3a0D16SGU4TXQjOtz2up14w7aqpA@mail.gmail.com>
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
<[email protected]> wrote:
> I guess my work around for now is to add this function to
> itkN4BiasFieldCorrectionImageFilter.h:
>
>   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
> <[email protected]> wrote:
>
>
> When I run itk.N4BiasFieldCorrectionImageFilter, I want to get the control
> point lattice, but when I run:
>
> 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
>
> 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
>
>
>
> _____________________________________
> 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
>
_____________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.