<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Ok thanks for this important precision.</p>
    <p>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 ?</p>
    <p>Thanks in advance.<br>
      Yannick<br>
    </p>
    <br>
    <div class="moz-cite-prefix">Le 22/12/2017 à 23:34, Simon Rit a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAF0oig0omPKDMr5q0D4x1Rnor_CY2A7k7wAoOLBPHipOJnPCWQ@mail.gmail.com">
      <div dir="ltr">
        <div>No it doesn't, it's voxel based. The adjoint which uses the
          step size is <a
href="http://www.openrtk.org/Doxygen/classrtk_1_1CudaRayCastBackProjectionImageFilter.html"
            moz-do-not-send="true">CudaRayCastBackProjectionImageFilter</a>
          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.<br>
        </div>
        Simon<br>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Fri, Dec 22, 2017 at 11:31 PM,
          Yannick Boursier <span dir="ltr"><<a
              href="mailto:boursier@cppm.in2p3.fr" target="_blank"
              moz-do-not-send="true">boursier@cppm.in2p3.fr</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div text="#000000" bgcolor="#FFFFFF">
              <p>Hi Simon, <br>
              </p>
              <p>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.<br>
              </p>
              <p>Merry Christmas to you, <br>
                Yannick<br>
              </p>
              <div>
                <div class="h5"> <br>
                  <div class="m_-2667162766585569410moz-cite-prefix">Le
                    22/12/2017 à 22:55, Simon Rit a écrit :<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">
                      <div>
                        <div>
                          <div>Hi Yannick,<br>
                          </div>
                          I would just try to change the <a
href="http://www.openrtk.org/Doxygen/classrtk_1_1CudaForwardProjectionImageFilter.html#a93671bae5219bada43b9a00b6046dbed"
                            target="_blank" moz-do-not-send="true">step
                            size</a>. 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.<br>
                        </div>
                        <div>Merry Christmas to you,<br>
                        </div>
                      </div>
                      Simon<br>
                    </div>
                    <div class="gmail_extra"><br>
                      <div class="gmail_quote">On Fri, Dec 22, 2017 at
                        9:17 PM, Yannick Boursier <span dir="ltr"><<a
                            href="mailto:boursier@cppm.in2p3.fr"
                            target="_blank" moz-do-not-send="true">boursier@cppm.in2p3.fr</a>></span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div text="#000000" bgcolor="#FFFFFF">
                            <p>Hi Cyril, <br>
                            </p>
                            <p>Sorry for my late answer. First thank you
                              because your last trick (removing
                              <InpuImageType>) worked, I correctly
                              compiled and installed everything.</p>
                            <p>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. <br>
                            </p>
                            <p>I understood this morning the problem and
                              put it in evidence : the
                              CudaForwardProjectionImageFilt<wbr>er
                              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 !! <br>
                            </p>
                            <p>I will try to debug it and let you know.</p>
                            <p>I wish to all of you a Merry Christmas
                              and relaxing holidays.</p>
                            <p>Best ,</p>
                            <p>Yannick<br>
                            </p>
                            <div>
                              <div class="m_-2667162766585569410h5"> <br>
                                <div
                                  class="m_-2667162766585569410m_-4428931898617340006moz-cite-prefix">Le
                                  18/12/2017 à 16:52, Cyril Mory a
                                  écrit :<br>
                                </div>
                                <blockquote type="cite">
                                  <p>Hi again Yannick,</p>
                                  <p>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.</p>
                                  <p>Cyril<br>
                                  </p>
                                  <br>
                                  <div
                                    class="m_-2667162766585569410m_-4428931898617340006moz-cite-prefix">On
                                    18/12/2017 16:31, Cyril Mory wrote:<br>
                                  </div>
                                  <blockquote type="cite">
                                    <p>Hi Yannick,</p>
                                    <p>You seem to be in a hurry, so
                                      I'll start with an incomplete
                                      answer: the
                                      CudaForwardProjectionImageFilt<wbr>er
                                      is templated over its input and
                                      output image type, but the
                                      CudaBackProjectionImageFilter
                                      isn't (compare
                                      rtkCudaForwardProjectionImageF<wbr>ilter.h
                                      and rtkCudaBackProjectionImageFilt<wbr>er.h,
                                      there is not "template <>"
                                      before the class definition in
                                      ...Back..., while it is there in
                                      ...Forward...).<br>
                                    </p>
                                    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.<br>
                                    <br>
                                    Cyril<br>
                                    <br>
                                    <br>
                                    <div
                                      class="m_-2667162766585569410m_-4428931898617340006moz-cite-prefix">On
                                      18/12/2017 16:07, Yannick BOURSIER
                                      wrote:<br>
                                    </div>
                                    <blockquote type="cite">
                                      <pre>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 (CudaForwardProjectionImageFil<wbr>ter is but not the BackProjection).

I tried to define a json file (in attachement) on the base of CudaForwardProjectionImageFilt<wbr>er (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<wbr>-extended/SimpleRTK-build/Code<wbr>/BasicFilters/src/srtkCudaBack<wbr>ProjectionImageFilter.cxx: In member function ‘rtk::simple::Image rtk::simple::CudaBackProjectio<wbr>nImageFilter::ExecuteInternal(<wbr>const rtk::simple::Image&, const rtk::simple::Image&)’:
/data/boursier/Compile/rtk-bin<wbr>-extended/SimpleRTK-build/Code<wbr>/BasicFilters/src/srtkCudaBack<wbr>ProjectionImageFilter.cxx:132:<wbr>16: error: ‘rtk::CudaBackProjectionImageF<wbr>ilter’ is not a template
   typedef rtk::CudaBackProjectionImageFi<wbr>lter<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</pre>
                                      <br>
                                      <fieldset
                                        class="m_-2667162766585569410m_-4428931898617340006mimeAttachmentHeader"></fieldset>
                                      <br>
                                      <pre>______________________________<wbr>_________________
Rtk-users mailing list
<a class="m_-2667162766585569410m_-4428931898617340006moz-txt-link-abbreviated" href="mailto:Rtk-users@public.kitware.com" target="_blank" moz-do-not-send="true">Rtk-users@public.kitware.com</a>
<a class="m_-2667162766585569410m_-4428931898617340006moz-txt-link-freetext" href="https://public.kitware.com/mailman/listinfo/rtk-users" target="_blank" moz-do-not-send="true">https://public.kitware.com/mai<wbr>lman/listinfo/rtk-users</a>
</pre>
                                    </blockquote>
                                    <br>
                                  </blockquote>
                                  <br>
                                </blockquote>
                                <br>
                              </div>
                            </div>
                          </div>
                          <br>
                          ______________________________<wbr>_________________<br>
                          Rtk-users mailing list<br>
                          <a href="mailto:Rtk-users@public.kitware.com"
                            target="_blank" moz-do-not-send="true">Rtk-users@public.kitware.com</a><br>
                          <a
                            href="https://public.kitware.com/mailman/listinfo/rtk-users"
                            rel="noreferrer" target="_blank"
                            moz-do-not-send="true">https://public.kitware.com/mai<wbr>lman/listinfo/rtk-users</a><br>
                          <br>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>