[Rtk-users] Python Wrapping

Johnson Keiriz jkeiriz at theobjects.com
Tue Mar 22 08:21:02 EDT 2016


Thanks,


On 3/22/2016 2:56 AM, Simon Rit wrote:
> Hi,
> We have had the same problem with 
> ConjugateGradientConeBeamReconstructionFilter.json that Fabien pushed 
> 2 days ago. Maybe have a look at this file to see if you can find some 
> useful inspiration? Otherwise I'll try to fix your file later.
> Simon
>
> On 18/03/2016 20:23, Johnson Keiriz wrote:
>> To be specific: it gives an error at every CUDA filter !!!
>>
>> On 3/18/2016 3:20 PM, Johnson Keiriz wrote:
>>> Hello,
>>> I have tried to create a .json file for the 
>>> *RegularizedConjugateGradientConeBeamReconstructionFilter *and got 
>>> the below errors while compiling.
>>>
>>> The json file contains:
>>>
>>> {
>>>   "name" : "RegularizedConjugateGradientConeBeamReconstructionFilter",
>>>   "template_code_filename" : "RTKImageFilter",
>>>   "template_test_filename" : "ImageFilter",
>>>   "number_of_inputs" : 2,
>>>   "doc" : "",
>>>   "output_image_type" : "TImageType",
>>>   "pixel_types" : "RealPixelIDTypeList",
>>>   "filter_type" : 
>>> "rtk::RegularizedConjugateGradientConeBeamReconstructionFilter<InputImageType>",
>>>   "include_files" : [
>>>     "srtkThreeDCircularProjectionGeometry.h"
>>>   ],
>>>   "members" : [],
>>>   "briefdescription" : "Implements regularized conjugate Gradient 
>>> cone-beam reconstruction.",
>>>   "detaileddescription" : ""
>>> }
>>>
>>>
>>> Error    1    error C2679: binary '=' : no operator found which 
>>> takes a right-hand operand of type 
>>> 'rtk::CudaBackProjectionImageFilter::Pointer' (or there is no 
>>> acceptable conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkIterativeConeBeamReconstructionFilter.hxx 77    1    
>>> SimpleRTK
>>> Error    2    error C2679: binary '=' : no operator found which 
>>> takes a right-hand operand of type 
>>> 'rtk::CudaRayCastBackProjectionImageFilter::Pointer' (or there is no 
>>> acceptable conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkIterativeConeBeamReconstructionFilter.hxx 87    1    
>>> SimpleRTK
>>> Error    3    error C2679: binary '=' : no operator found which 
>>> takes a right-hand operand of type 
>>> 'rtk::CudaConstantVolumeSource::Pointer' (or there is no acceptable 
>>> conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkReconstructionConjugateGradientOperator.hxx 39    
>>> 1    SimpleRTK
>>> Error    4    error C2679: binary '=' : no operator found which 
>>> takes a right-hand operand of type 
>>> 'rtk::CudaConstantVolumeSource::Pointer' (or there is no acceptable 
>>> conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkReconstructionConjugateGradientOperator.hxx 40    
>>> 1    SimpleRTK
>>> Error    5    error C2679: binary '=' : no operator found which 
>>> takes a right-hand operand of type 
>>> 'rtk::CudaLaplacianImageFilter::Pointer' (or there is no acceptable 
>>> conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkReconstructionConjugateGradientOperator.hxx 41    
>>> 1    SimpleRTK
>>> Error    6    error C2679: binary '=' : no operator found which 
>>> takes a right-hand operand of type 
>>> 'rtk::CudaDisplacedDetectorImageFilter::Pointer' (or there is no 
>>> acceptable conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkConjugateGradientConeBeamReconstructionFilter.hxx 
>>> 42    1    SimpleRTK
>>> Error    7    error C2679: binary '=' : no operator found which 
>>> takes a right-hand operand of type 
>>> 'rtk::CudaConstantVolumeSource::Pointer' (or there is no acceptable 
>>> conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkConjugateGradientConeBeamReconstructionFilter.hxx 
>>> 43    1    SimpleRTK
>>> Error    8    error C2679: binary '=' : no operator found which 
>>> takes a right-hand operand of type 
>>> 'rtk::CudaConjugateGradientImageFilter_3f::Pointer' (or there is no 
>>> acceptable conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkConjugateGradientConeBeamReconstructionFilter.hxx 
>>> 129    1    SimpleRTK
>>> Error    9    error C2678: binary '*' : no operator found which 
>>> takes a left-hand operand of type 'float' (or there is no acceptable 
>>> conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkMagnitudeThresholdImageFilter.hxx    59    1 SimpleRTK
>>> Error    10    error C2679: binary '=' : no operator found which 
>>> takes a right-hand operand of type 
>>> 'rtk::CudaBackProjectionImageFilter::Pointer' (or there is no 
>>> acceptable conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkIterativeConeBeamReconstructionFilter.hxx 77    1    
>>> SimpleRTK
>>> Error    11    error C2679: binary '=' : no operator found which 
>>> takes a right-hand operand of type 
>>> 'rtk::CudaRayCastBackProjectionImageFilter::Pointer' (or there is no 
>>> acceptable conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkIterativeConeBeamReconstructionFilter.hxx 87    1    
>>> SimpleRTK
>>> Error    12    error C2679: binary '=' : no operator found which 
>>> takes a right-hand operand of type 
>>> 'rtk::CudaConstantVolumeSource::Pointer' (or there is no acceptable 
>>> conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkReconstructionConjugateGradientOperator.hxx 39    
>>> 1    SimpleRTK
>>> Error    13    error C2679: binary '=' : no operator found which 
>>> takes a right-hand operand of type 
>>> 'rtk::CudaConstantVolumeSource::Pointer' (or there is no acceptable 
>>> conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkReconstructionConjugateGradientOperator.hxx 40    
>>> 1    SimpleRTK
>>> Error    14    error C2679: binary '=' : no operator found which 
>>> takes a right-hand operand of type 
>>> 'rtk::CudaLaplacianImageFilter::Pointer' (or there is no acceptable 
>>> conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkReconstructionConjugateGradientOperator.hxx 41    
>>> 1    SimpleRTK
>>> Error    15    error C2679: binary '=' : no operator found which 
>>> takes a right-hand operand of type 
>>> 'rtk::CudaDisplacedDetectorImageFilter::Pointer' (or there is no 
>>> acceptable conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkConjugateGradientConeBeamReconstructionFilter.hxx 
>>> 42    1    SimpleRTK
>>> Error    16    error C2679: binary '=' : no operator found which 
>>> takes a right-hand operand of type 
>>> 'rtk::CudaConstantVolumeSource::Pointer' (or there is no acceptable 
>>> conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkConjugateGradientConeBeamReconstructionFilter.hxx 
>>> 43    1    SimpleRTK
>>> Error    17    error C2679: binary '=' : no operator found which 
>>> takes a right-hand operand of type 
>>> 'rtk::CudaConjugateGradientImageFilter_3f::Pointer' (or there is no 
>>> acceptable conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkConjugateGradientConeBeamReconstructionFilter.hxx 
>>> 129    1    SimpleRTK
>>> Error    18    error C2678: binary '*' : no operator found which 
>>> takes a left-hand operand of type 'float' (or there is no acceptable 
>>> conversion) 
>>> [C:\RTK\BUILD\SimpleRTK-build\Code\BasicFilters\src\SimpleRTKBasicFilters2.vcxproj] 
>>> c:\rtk\code\rtkMagnitudeThresholdImageFilter.hxx    59    1 SimpleRTK
>>>
>>>
>>> Thanks,
>>> Johnson
>>>
>>> On 3/18/2016 2:16 PM, Johnson Keiriz wrote:
>>>> Hello,
>>>> I am trying to do the wrapping for the 
>>>> RegularizedConjugateGradientConeBeamReconstructionFilter, do I need 
>>>> to wrap all the filters that it uses ?
>>>> Is there any guiding document for the wrapping method?
>>>>
>>>> Regards,
>>>> Johnson
>>>>
>>>> On 3/18/2016 9:31 AM, Cyril Mory wrote:
>>>>> Hi again,
>>>>>
>>>>> You got the SART filter right. As for the conjugate gradient, the 
>>>>> filter is actually ConjugateGradientConeBeamReconstructionFilter 
>>>>> (for the 3D non-regularized reconstruction) and 
>>>>> RegularizedConjugateGradientConeBeamReconstructionFilter (its 
>>>>> regularized counterpart).
>>>>>
>>>>> The filter you found, 
>>>>> FourDConjugateGradientConeBeamReconstructionFilter, is used for 4D 
>>>>> reconstruction (you need a cardiac or respiratory phase signal). 
>>>>> Its regularized counterpart is 
>>>>> FourDROOSTERConeBeamReconstructionFilter.
>>>>>
>>>>> In addition to those, RTK also has 
>>>>> ADMMTotalVariationConeBeamReconstructionFilter and 
>>>>> ADMMWaveletsConeBeamReconstructionFilter, which implement the 
>>>>> Alternating Direction Method of Multiplier algorithm.
>>>>>
>>>>> You can find a description of these algorithms in 
>>>>> https://hal.inria.fr/tel-00985728/document
>>>>>
>>>>> Note that the SART filter has a m_NumberOfProjectionsPerSubset 
>>>>> member. Setting it to 1 (default) gives you SART, setting it to n 
>>>>> with 1 < n < TotalNumberOfProjections gives you OS-SART, and 
>>>>> setting it to n=TotalNumberOfProjections gives you SIRT.
>>>>>
>>>>> That's pretty much all there is in RTK at the moment.
>>>>> Cyril
>>>>>
>>>>> On 03/18/2016 02:11 PM, Johnson Keiriz wrote:
>>>>>> Hello,
>>>>>> Can you please confirm that the following classes are the ones 
>>>>>> used for the iterative reconstruction:
>>>>>> 1 - SART: SARTConeBeamReconstructionFilter
>>>>>> 2- Conjugate gradient: 
>>>>>> FourDConjugateGradientConeBeamReconstructionFilter
>>>>>>
>>>>>> Is there a 3D conjugate gradient?
>>>>>> Are these the only classes for iterative reconstruction?
>>>>>>
>>>>>> Thanks,
>>>>>> Johnson
>>>>>>
>>>>>> On 3/18/2016 4:12 AM, Cyril Mory wrote:
>>>>>>> Hi Johnson,
>>>>>>>
>>>>>>> Regarding the iterative methods:
>>>>>>> - In SART, you can use the CUDA forward and back projectors, but 
>>>>>>> the rest of the calculation is performed on CPU. We do not use 
>>>>>>> SART a lot, so we have not fully optimized it.
>>>>>>> - Conjugate gradient, on the other hand, is entirely performed 
>>>>>>> on the GPU. Note that a regularized conjugate gradient 
>>>>>>> reconstruction filter is also available (with total variation 
>>>>>>> denoising, wavelets denoising, and positivity enforcement)
>>>>>>>
>>>>>>> I hope you will find what you need,
>>>>>>> Regards,
>>>>>>> Cyril
>>>>>>>
>>>>>>> On 03/17/2016 08:54 PM, Johnson Keiriz wrote:
>>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> I did rebuild and now things are working. I tested 
>>>>>>>> reconstruction with and without the filtering and there were 
>>>>>>>> differences. Though, I am not sure that filtering have provided 
>>>>>>>> a better reconstruction.
>>>>>>>>
>>>>>>>> I want to experiment the iterative methods. Can you please 
>>>>>>>> confirm for me which iterative method are fully implemented in 
>>>>>>>> CUDA: is it the conjugate gradient or SART ?
>>>>>>>>
>>>>>>>> I have noticed that they are not wrapped at all, any guide on 
>>>>>>>> how to introduce new filters?
>>>>>>>>
>>>>>>>> Once I have tested my wrapping, I will submit a github 
>>>>>>>> pull-request.
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Johnson
>>>>>>>>
>>>>>>>> *From:*simon.rit at gmail.com [mailto:simon.rit at gmail.com] *On 
>>>>>>>> Behalf Of *Simon Rit
>>>>>>>> *Sent:* Thursday, March 17, 2016 1:54 PM
>>>>>>>> *To:* Johnson Keiriz
>>>>>>>> *Cc:* rtk-users at public.kitware.com
>>>>>>>> *Subject:* Re: [Rtk-users] Python Wrapping
>>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> Good! Indeed, many things are not wrapped. There is a trick 
>>>>>>>> regarding modifications of the wrappings. You need to either 
>>>>>>>> start from scratch the compilation or delete the file 
>>>>>>>> SimpleRTK-prefix/src/SimpleRTK-stamp/SimpleRTK-configure. This 
>>>>>>>> will trigger a reconfiguration of the SimpleRTK and, hopefully, 
>>>>>>>> account for your modifications.
>>>>>>>>
>>>>>>>> Don't hesitate to submit a github pull-request when you have 
>>>>>>>> something working.
>>>>>>>>
>>>>>>>> Simon
>>>>>>>>
>>>>>>>> On Thu, Mar 17, 2016 at 4:33 PM, Johnson Keiriz 
>>>>>>>> <jkeiriz at theobjects.com> wrote:
>>>>>>>>
>>>>>>>> Hello again,
>>>>>>>>
>>>>>>>> I found out about the json wrapping files. I added the wrapping 
>>>>>>>> for all the filters, but I haven’t noticed any effect from 
>>>>>>>> setting the filters !!!
>>>>>>>>
>>>>>>>> Any hints ?
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> Johnson
>>>>>>>>
>>>>>>>> *From:*Rtk-users [mailto:rtk-users-bounces at public.kitware.com] 
>>>>>>>> *On Behalf Of *Johnson Keiriz
>>>>>>>> *Sent:* Thursday, March 17, 2016 9:23 AM
>>>>>>>> *To:* rtk-users at public.kitware.com; Simon Rit
>>>>>>>> *Subject:* [Rtk-users] Python Wrapping
>>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> I am using the Python wrapped version of RTK. I have a question 
>>>>>>>> regarding the wrapping:
>>>>>>>>
>>>>>>>> It seems that not all functionality is available, for example: 
>>>>>>>> for the *CudaFDKConeBeamReconstructionFilter, *I was not able 
>>>>>>>> to set the cut frequency of the any of the filters
>>>>>>>>
>>>>>>>> (RamLaK, Cosine, ShepLogan) except for the Hann . Are the 
>>>>>>>> methods not wrapped ?
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>>
>>>>>>>> Johnson
>>>>>>>>
>>>>>>>> *Description: cid:image002.jpg at 01CB5984.4EABACE0*
>>>>>>>>
>>>>>>>> 	
>>>>>>>>
>>>>>>>> *Johnson Keiriz, PhD
>>>>>>>> Senior Software Engineer*
>>>>>>>>
>>>>>>>> 760 St-Paul W, #101
>>>>>>>> Montreal, QC
>>>>>>>> Canada  H3C 1M4
>>>>>>>> tel: (514) 843-3861 <tel:%28514%29%20843-3861>
>>>>>>>> ext 217
>>>>>>>>
>>>>>>>> 	
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> Rtk-users mailing list
>>>>>>>> Rtk-users at public.kitware.com
>>>>>>>> http://public.kitware.com/mailman/listinfo/rtk-users
>>>>>>>
>>>>>>
>>>>>> -- 
>>>>>>
>>>>>> *Johnson Keiriz, PhD
>>>>>> Senior Software Engineer*
>>>>>>
>>>>>> 760 St-Paul W, #101
>>>>>> Montreal, QC
>>>>>> Canada  H3C 1M4
>>>>>> tel: (514) 843-3861
>>>>>> ext 217
>>>>>>
>>>>>
>>>>
>>>> -- 
>>>>
>>>> *Johnson Keiriz, PhD
>>>> Senior Software Engineer*
>>>>
>>>> 760 St-Paul W, #101
>>>> Montreal, QC
>>>> Canada  H3C 1M4
>>>> tel: (514) 843-3861
>>>> ext 217
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Rtk-users mailing list
>>>> Rtk-users at public.kitware.com
>>>> http://public.kitware.com/mailman/listinfo/rtk-users
>>>
>>> -- 
>>>
>>> *Johnson Keiriz, PhD
>>> Senior Software Engineer*
>>>
>>> 760 St-Paul W, #101
>>> Montreal, QC
>>> Canada  H3C 1M4
>>> tel: (514) 843-3861
>>> ext 217
>>>
>>>
>>>
>>> _______________________________________________
>>> Rtk-users mailing list
>>> Rtk-users at public.kitware.com
>>> http://public.kitware.com/mailman/listinfo/rtk-users
>>
>> -- 
>>
>> *Johnson Keiriz, PhD
>> Senior Software Engineer*
>>
>> 760 St-Paul W, #101
>> Montreal, QC
>> Canada  H3C 1M4
>> tel: (514) 843-3861
>> ext 217
>>
>>
>>
>> _______________________________________________
>> Rtk-users mailing list
>> Rtk-users at public.kitware.com
>> http://public.kitware.com/mailman/listinfo/rtk-users
>

-- 

*Johnson Keiriz, PhD
Senior Software Engineer*

760 St-Paul W, #101
Montreal, QC
Canada  H3C 1M4
tel: (514) 843-3861
ext 217

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20160322/b4efaf55/attachment-0010.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/jpeg
Size: 3930 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20160322/b4efaf55/attachment-0010.jpe>


More information about the Rtk-users mailing list