It depends on how you define normal... It hasn't been wrapped so it's expected but we should have wrapped it when creating the json file. You need to add }, { "name" : "StepSize", "type" : "double", "default" : "1." after the line containing custom_itk_cast in the members section, i.e., before the curly bracket closing the Geometry section (which, after pasting, will close the StepSize section). Don't forget the note on the wiki about json files:
*Note that you might need to rebuild the solution in order for CMake to take the changes into account.* Another solution is to manually delete the file SimpleRTK-prefix/src/SimpleRTK-stamp/SimpleRTK-configure. This wrapping is a bit annoying so we do it when we need to access one class or member. We will soon move to a new python wrapping which will hopefully be easier (this is the purpose of the RTK-ExternalModule branch on the repository). We'll keep you posted! Simon On Fri, Dec 22, 2017 at 11:42 PM, Yannick Boursier <bours...@cppm.in2p3.fr> wrote: > Ok thanks for this important precision. > > Just a remark, I don't have access to the SetStepSize() function through > SimpleRTK. Is it normal ? Does it come from the .json file or the template ? > > Thanks in advance. > Yannick > > Le 22/12/2017 à 23:34, Simon Rit a écrit : > > No it doesn't, it's voxel based. The adjoint which uses the step size is > CudaRayCastBackProjectionImageFilter > <http://www.openrtk.org/Doxygen/classrtk_1_1CudaRayCastBackProjectionImageFilter.html> > but it's very slow and we never use it in practice because it's not > practical. When we want to use adjoint operators, we mainly use the CPU > version, with double precision when adjointness is very important. > Simon > > On Fri, Dec 22, 2017 at 11:31 PM, Yannick Boursier <bours...@cppm.in2p3.fr > > wrote: > >> Hi Simon, >> >> Thank you a lot for your answer, I will try to put the step size to the >> voxel size then (if I understand well). It seems that the implementation of >> the CudaBackProjectionImageFilter doesn't use any stepsize. I'll let you >> know. >> >> Merry Christmas to you, >> Yannick >> >> Le 22/12/2017 à 22:55, Simon Rit a écrit : >> >> Hi Yannick, >> I would just try to change the step size >> <http://www.openrtk.org/Doxygen/classrtk_1_1CudaForwardProjectionImageFilter.html#a93671bae5219bada43b9a00b6046dbed>. >> Indeed, the CPU version is the Joseph projector and it adapts automatically >> the step size to each ray for bilinear interpolation in each slice. The GPU >> version is a fixed step size combined with a trilinear interpolation. >> Merry Christmas to you, >> Simon >> >> On Fri, Dec 22, 2017 at 9:17 PM, Yannick Boursier <bours...@cppm.in2p3.fr >> > wrote: >> >>> Hi Cyril, >>> >>> Sorry for my late answer. First thank you because your last trick >>> (removing <InpuImageType>) worked, I correctly compiled and installed >>> everything. >>> >>> I am late because I thought that I did something wrong since when I >>> tested the code by simply projecting then backprojecting a simple volume, >>> the results between the CPU-codes and GPU-codes were different and the GPU >>> result cas clearly wrong. >>> >>> I understood this morning the problem and put it in evidence : the >>> CudaForwardProjectionImageFilter seems to be not adapted to the case >>> when the size of voxels and pixels are not equal to 1 whereas the >>> CudaBackProjectionImageFilter is OK for that !! >>> >>> I will try to debug it and let you know. >>> >>> I wish to all of you a Merry Christmas and relaxing holidays. >>> >>> Best , >>> >>> Yannick >>> >>> Le 18/12/2017 à 16:52, Cyril Mory a écrit : >>> >>> Hi again Yannick, >>> >>> Simply removing the <InputImageType> on line 9 of your .json file made >>> it compile. I didn't test it yet. Let us know if that works for you. >>> >>> Cyril >>> >>> On 18/12/2017 16:31, Cyril Mory wrote: >>> >>> Hi Yannick, >>> >>> You seem to be in a hurry, so I'll start with an incomplete answer: the >>> CudaForwardProjectionImageFilter is templated over its input and output >>> image type, but the CudaBackProjectionImageFilter isn't (compare >>> rtkCudaForwardProjectionImageFilter.h and >>> rtkCudaBackProjectionImageFilter.h, >>> there is not "template <>" before the class definition in ...Back..., while >>> it is there in ...Forward...). >>> I'm trying to modify your .json file accordingly, recompile and test, >>> but I never use SimpleRTK myself, so you might find the solution before I >>> do. If so, please report back on this mailing list. >>> >>> Cyril >>> >>> >>> On 18/12/2017 16:07, Yannick BOURSIER wrote: >>> >>> Hello all, >>> >>> I really need in "relative" emergency to execute the kernel >>> CudaBackProjectionImageFilter using the Python Wrapper provided by >>> SimpleRTK. >>> Unfortunately, this is not implemented in cuda >>> (CudaForwardProjectionImageFilter is but not the BackProjection). >>> >>> I tried to define a json file (in attachement) on the base of >>> CudaForwardProjectionImageFilter (since all the h, hxx, cxx, files I looked >>> at seemed to be the same for these two kernels) but it does not compile >>> (cmake instruction OK but not the make instruction) with the following >>> error : >>> >>> /data/boursier/Compile/rtk-bin-extended/SimpleRTK-build/Code/BasicFilters/src/srtkCudaBackProjectionImageFilter.cxx: >>> In member function ‘rtk::simple::Image >>> rtk::simple::CudaBackProjectionImageFilter::ExecuteInternal(const >>> rtk::simple::Image&, const rtk::simple::Image&)’: >>> /data/boursier/Compile/rtk-bin-extended/SimpleRTK-build/Code/BasicFilters/src/srtkCudaBackProjectionImageFilter.cxx:132:16: >>> error: ‘rtk::CudaBackProjectionImageFilter’ is not a template >>> typedef rtk::CudaBackProjectionImageFilter<InputImageType> FilterType; >>> >>> I would very much appreciate some help please because at this point, I have >>> no idea about the problem... >>> Thanks in advance, >>> Best regards, >>> Yannick Boursier >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing >>> listRtk-users@public.kitware.comhttps://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >>> >>> >>> >>> _______________________________________________ >>> Rtk-users mailing list >>> Rtk-users@public.kitware.com >>> https://public.kitware.com/mailman/listinfo/rtk-users >>> >>> >> >> > >
_______________________________________________ Rtk-users mailing list Rtk-users@public.kitware.com https://public.kitware.com/mailman/listinfo/rtk-users