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

Pascal Bourgault pascal.bourgault at gmail.com
Tue Apr 4 18:56:46 CEST 2017


That was it, thanks a lot!

I am using code from someone else but didn't see that the itkCudaImage
declaration was commented for some reason.

I did compile RTK without problems. I am now integrating rtk methods into a
bigger project.

Thanks again!

--
Pascal

2017-04-04 12:16 GMT-04:00 Simon Rit <simon.rit at creatis.insa-lyon.fr>:

> 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/rtkConjugateGradientConeBeamRecon
>> structionFilter.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::Displac
>> edDetectorImageFilter<itk::Image<float, 3u>, itk::Image<float, 3u> > >}’
>> and ‘rtk::CudaDisplacedDetectorImageFilter::Pointer {aka
>> itk::SmartPointer<rtk::CudaDisplacedDetectorImageFilter>}’)
>>   m_DisplacedDetectorFilter = rtk::CudaDisplacedDetectorImag
>> eFilter::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://www.creatis.insa-lyon.fr/pipermail/rtk-users/attachments/20170404/ea4400e3/attachment.htm>


More information about the Rtk-users mailing list