[Rtk-users] itk::SmartPointer assignment : Base vs. Derived cuda class bug

Simon Rit simon.rit at creatis.insa-lyon.fr
Tue Apr 4 12:16:07 EDT 2017


Hi Pascal,
Are you trying a piece of code which is yours or failing to compile RTK? It
seems that you have compiled RTK with the Cuda option. Therefore, you
should instantiate your filters with an itk::CudaImage and not a regular
itk::Image. This doesn't prevent the use of the CPU in the conjugate
gradient filter with CPU operators. See for example the application code
for both Cuda and non-Cuda versions:
https://github.com/SimonRit/RTK/blob/master/applications/rtkconjugategradient/rtkconjugategradient.cxx
Simon


On Tue, Apr 4, 2017 at 5:45 PM, Pascal Bourgault <pascal.bourgault at gmail.com
> wrote:

> Hi,
>
> I'm currently trying to the rtkConjugateGradientConeBeamReconstructionFilter,
> but I am not able to compile anyof my codes because of the following error:
>
> /usr/local/include/RTK-1.3/rtkConjugateGradientConeBeamRe
> constructionFilter.hxx:43:29: error: no match for ‘operator=’ (operand
> types are ‘rtk::DisplacedDetectorImageFilter<itk::Image<float, 3u>,
> itk::Image<float, 3u> >::Pointer {aka itk::SmartPointer<rtk::
> DisplacedDetectorImageFilter<itk::Image<float, 3u>, itk::Image<float, 3u>
> > >}’ and ‘rtk::CudaDisplacedDetectorImageFilter::Pointer {aka
> itk::SmartPointer<rtk::CudaDisplacedDetectorImageFilter>}’)
>   m_DisplacedDetectorFilter = rtk::CudaDisplacedDetectorImageFilt
> er::New();
>
> (And many more instances of the same kind)
>
> It seems that the SmartPointer of the CudaDisplacedDetectorImageFilter
> cannot be assigned to its base-class SmartPointer for some reason. As the
> bugs occurs in the RTK code directly, I am a bit confused and guess it has
> something to do with my configuration? Perhaps it has to do with Cuda,
> because it seems this bug only occurs when I the derived class is
> Cuda-based.
>
> I use RTK-1.3.0, ITK-4.9.0 (as packaged in libinsighttoolkit4-dev on
> Ubuntu 16.04), gcc 5.4 and Cuda 8.0.
>
> Do you have any ideas of why this error occurs? Am I missing something,
> some unset options?
>
> Thanks!
>
> --
> Pascal
>
> _______________________________________________
> Rtk-users mailing list
> Rtk-users at public.kitware.com
> http://public.kitware.com/mailman/listinfo/rtk-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20170404/dbcceb0e/attachment.html>


More information about the Rtk-users mailing list