<div dir="ltr"><div><div>Hi Pascal,<br></div>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:<br><a href="https://github.com/SimonRit/RTK/blob/master/applications/rtkconjugategradient/rtkconjugategradient.cxx">https://github.com/SimonRit/RTK/blob/master/applications/rtkconjugategradient/rtkconjugategradient.cxx</a><br></div>Simon<br><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 4, 2017 at 5:45 PM, Pascal Bourgault <span dir="ltr"><<a href="mailto:pascal.bourgault@gmail.com" target="_blank">pascal.bourgault@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div>Hi,<br><br></div>I'm currently trying to the rtkConjugateGradientConeBeamRe<wbr>constructionFilter, but I am not able to compile anyof my codes because of the following error:<br><br><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt" id="m_-4194227868171776027gmail-docs-internal-guid-b3765a67-399a-5772-08c1-6d38581e969a"><span style="font-family:monospace,monospace"><span style="font-size:9pt;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:italic;font-variant:normal;text-decoration:none;vertical-align:baseline">/usr/local/include/RTK-1.3/<wbr>rtkConjugateGradientConeBeamRe<wbr>constructionFilter.hxx</span><span style="font-size:9pt;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">:43:29: </span><span style="font-size:9pt;color:rgb(255,0,0);background-color:transparent;font-weight:700;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">error</span><span style="font-size:9pt;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">: no match for ‘</span><span style="font-size:9pt;color:rgb(102,102,102);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">operator=</span><span style="font-size:9pt;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">’ (operand types are ‘rtk::<wbr>DisplacedDetectorImageFilter<<wbr>itk::Image<float, 3u>, itk::Image<float, 3u> >::Pointer {aka itk::SmartPointer<rtk::<wbr>DisplacedDetectorImageFilter<<wbr>itk::Image<float, 3u>, itk::Image<float, 3u> > >}’ and ‘rtk::<wbr>CudaDisplacedDetectorImageFilt<wbr>er::Pointer {aka itk::SmartPointer<rtk::<wbr>CudaDisplacedDetectorImageFilt<wbr>er>}’)</span></span></p><span style="font-family:monospace,monospace"><span style="font-size:9pt;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">   </span><span style="font-size:9pt;color:rgb(0,0,0);background-color:transparent;font-weight:700;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">m_DisplacedDetectorFilter = rtk::<wbr>CudaDisplacedDetectorImageFilt<wbr>er::New();<br></span></span></div><div><span style="font-family:arial,helvetica,sans-serif"><span style="font-size:9pt;color:rgb(0,0,0);background-color:transparent;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><br>(And many more instances of the same kind)</span></span><span style="font-family:monospace,monospace"><span style="font-size:9pt;color:rgb(0,0,0);background-color:transparent;font-weight:700;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><br><br></span></span></div><span style="font-family:monospace,monospace"><span style="font-size:9pt;color:rgb(0,0,0);background-color:transparent;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><font face="arial,helvetica,sans-serif"><font size="2">It seems that the SmartPointer of the CudaDisplacedDetectorImageFilt<wbr>er 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.<br><br></font></font></span></span></div><span style="font-family:monospace,monospace"><span style="font-size:9pt;color:rgb(0,0,0);background-color:transparent;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><font face="arial,helvetica,sans-serif"><font size="2">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.<br><br></font></font></span></span></div><div><span style="font-family:monospace,monospace"><span style="font-size:9pt;color:rgb(0,0,0);background-color:transparent;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><font face="arial,helvetica,sans-serif"><font size="2">Do you have any ideas of why this error occurs? Am I missing something, some unset options? <br></font></font></span></span></div><div><span style="font-family:monospace,monospace"><span style="font-size:9pt;color:rgb(0,0,0);background-color:transparent;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><font face="arial,helvetica,sans-serif"><font size="2"><br></font></font></span></span></div><div><span style="font-family:monospace,monospace"><span style="font-size:9pt;color:rgb(0,0,0);background-color:transparent;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><font face="arial,helvetica,sans-serif"><font size="2">Thanks!<br><br>--<br></font></font></span></span></div><div><span style="font-family:monospace,monospace"><span style="font-size:9pt;color:rgb(0,0,0);background-color:transparent;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><font face="arial,helvetica,sans-serif"><font size="2">Pascal<br></font></font></span></span></div><span style="font-family:monospace,monospace"><span style="font-size:9pt;color:rgb(0,0,0);background-color:transparent;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"><font face="arial,helvetica,sans-serif"><font size="2"></font></font></span></span><div><div><span style="font-family:monospace,monospace"><span style="font-size:9pt;color:rgb(0,0,0);background-color:transparent;font-weight:700;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"></span></span></div></div></div>
<br>______________________________<wbr>_________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com">Rtk-users@public.kitware.com</a><br>
<a href="http://public.kitware.com/mailman/listinfo/rtk-users" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/rtk-users</a><br>
<br></blockquote></div><br></div>