<div dir="ltr"><div><div><div><div>Interesting... I never used a geometry with negative sdd and sid but that's the issue here in my opinion. I did a quick test with positive and negative sdd/sid and that does not work for me either.<br></div>Can you make them positive somehow? BTW, do you still use a modified version of the reg23 and can you share it?<br></div>Thanks,<br></div>Simon<br><br></div>PS: the script I used for the test:<br>rtksimulatedgeometry \<br> -o g \<br> -n 360 \<br> --sdd 1500 \<br> --sid 1000<br>rtkprojectshepploganphantom \<br> -g g \<br> -o p.mha \<br> --dimension 256,3,256 \<br> --spacing 2<br>rtkfdk -p . -r ^p.mha$ -o pos.mha -g g<br><br><br>rtksimulatedgeometry \<br> -o g \<br> -n 360 \<br> --sdd -1500 \<br> --sid -1000<br>rtkprojectshepploganphantom \<br> -g g \<br> -o p.mha \<br> --dimension 256,3,256 \<br> --spacing 2<br>rtkfdk -p . -r ^p.mha$ -o neg.mha -g g<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 15, 2015 at 1:55 PM, Notargiacomo Thibault <span dir="ltr"><<a href="mailto:gnthibault@gmail.com" target="_blank">gnthibault@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>Thank you very much Simon for this advice, I should have read more carefully the recent posts about FFTWF / FFTWD.<br><br></div>Now that Itk has been rebuilt using these flags, I no longer experience the previous problem.<br></div><div>Unfortunately, when reconstructing with the CPU version of FDK, it seems that, although Ramp filtering and backprojection now do work very well, I still have issues with the weighting filter of FDK.<br><br></div><div>As I am not familiar with analytic reconstruction methods, I don't know if the geometric parameters that are generated by the import method of Reg23ProjectionGeometry are consistant with the high variability of the gain factor applied to my projection by FDKWeightProjectionFilter:<br><br></div><div>Just a short example:<br></div><div>When using the following geometric parameters:<br><br>SrcToCenter -1045.84<br>SrcToDet -1261.02<br>srcOffX 6.56918<br>srcOffY 6.56918<br>ProjOffX -151.44<br>ProjOffY -151.44<br><br></div><div>=> FDKWeighting filter outputs an image that has a mean of -1.518 with a standard deviation of 2.056 with minimum value of -6.130 and maximum value of 1.871<br><br><br></div><div>On a frame where the source offset seems to be a little bit lower, I have the following gemetric parameters:<br><br>SrcToCenter -1042.66<br>SrcToDet -1257.4<br>srcOffX 1.25469<br>srcOffY 1.25469<br>ProjOffX -150.321<br>ProjOffY -150.321<br><br>=> FDKWeighting filter outputs an image that has a mean of -4.279E-4 with a
standard deviation of 5.786E-4 with minimum value of -0.005 and maximum
value of 5.268E-4<br><br></div><div>For comparison, our attenuation images in input of FDK have a mean of 0.8 with a
standard deviation of 1.09 with minimum value of -1 and maximum
value of 3.262.<br><br></div><div>Here the negative values of attenuation arise from a problem while approximating the I0 in our images, although we should work on that problem, it was not that critical in SART reconstruction. <br></div><div><br></div><div>I am surprised by such an important difference in gain applied to projection, given that, when disabling manually this weighting filter in RTK code, RampFiltering and BackProjection alone provided visually good reconstruction results.<br><br></div><div>If you have any idea of what could have gone wrong in the process of importing geometry and/or applying weighting filter, I would be glad to hear it.<br><br></div><div>Thank you in advance.<br><br></div><div>Kind regards<span class="HOEnZb"><font color="#888888"><br><br></font></span></div><span class="HOEnZb"><font color="#888888"><div>Thibault Notargiacomo<br></div></font></span><div><div class="h5"><div><br><br></div><div><br><br><br></div><div><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-10-14 18:58 GMT+02:00 Simon Rit <span dir="ltr"><<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div>Hi Thibault,<br></div>No, there is not really a log system that would allow you debugging at run time. You can compile a debug version that would enable a lot of messages related to the pipeline. For this, I think you need to use NDEBUG at compilation (it's an ITK mechanism that I never use).<br></div>No, it's not normal that you see an error message. There are two things:<br></div>- the FFT of itk (compiled by default, based on vnl) is really bad IMO: it only handles power of 2/3/5 dimensions and it's slow. I always advise people to use FFTW by turning on ITK_USE_FFTW options during ITK's compilation.<br></div>- I don't fully understand why vnl doesn't work either. I understand the first two dimensions, for vnl (which I strongly suggest to not use), I pad to the next power of 2 so<br></div>780 * 2 (for zero padding) -> 2048<br>780 -> 1024<br></div>but then, if you use 64 projections, why 11? Are you sure the second input image to FDKConeBeamReconstructionImageFilter has the dimension you want? I would try to connect input 2 to an itk::ImageFileWriter and check what are the dimensions of this image. If you're absolutely sure, then I'll try to reproduce and fix the issue.<br><div><div>Simon<br> </div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Wed, Oct 14, 2015 at 11:38 AM, Notargiacomo Thibault <span dir="ltr"><<a href="mailto:gnthibault@gmail.com" target="_blank">gnthibault@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div><div dir="ltr"><div><div>Dear all,<br><br></div>I recently had troubles while trying to rewrite my code, linked with libRTK / libRTKcuda, from using rtk cuda version of SART, that worked quite well, to using fdk reconstruction method.<br><br></div><div>My first question: is there a general way to enable maximum debug log level at runtime in rtk ?<br><br></div><div>My second question, is more specific: is it normal that I see such error message coming from itk when using FDKConeBeamReconstructionFilter :<br><br>ExceptionObject caught with fdk->Update() in file [...]<br><br>itk::ExceptionObject (0x7f377c020cb0)<br>Location: "unknown" <br>File: [...]/itk-4.8.1/Modules/Core/Common/src/itkMultiThreader.cxx<br>Line: 416<br>Description: itk::ERROR: MultiThreader(0x1866340): Exception occurred during SingleMethodExecute<br>/usr/local/include/ITK-4.8/itkVnlRealToHalfHermitianForwardFFTImageFilter.hxx:60:<br>itk::ERROR: VnlRealToHalfHermitianForwardFFTImageFilter(0x7f377c0207d0): Cannot compute FFT of image with size [2048, 1024, 11]. VnlRealToHalfHermitianForwardFFTImageFilter operates only on images whose size in each dimension has a prime factorization consisting of only 2s, 3s, or 5s.<br><br></div><div>I suppose that this error arise while performing ramp filtering, but I see no relation between FFT configuration stated in the error log ( [2048, 1024, 11] ) and the size of my input image, which is 780 * 720, over 64 projections.<br><br></div><div>I also tried with 200 projection and I had the same problem, but with [2048, 1024, 34]</div><div><br></div><div>Note that I set my FDKConeBeamReconstructionFilter ProjectionSubsetSize to the total number of projection in my dataset every time.<br></div><div><br></div><div>The revision I am currently using:<br>commit 4993ddfca5b3d59a2fcf71f94890036ede610a08<br>Merge: 578cf89 09d820c<br></div><div><br><br></div><div>Thank you in advance for your help.<br><br></div><div>Regards<span><font color="#888888"><br><br></font></span></div><span><font color="#888888"><div>Thibault Notargiacomo<br></div></font></span></div>
<br></div></div>_______________________________________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com" target="_blank">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/mailman/listinfo/rtk-users</a><br>
<br></blockquote></div><br></div></div>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div>