<div dir="ltr"><div>Thanks for the report, I'll try to fix this issue (I have noted it on github <a href="https://github.com/SimonRit/RTK/issues/290">here</a>). And thanks in advance for the code!<br></div><div>Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 22, 2020 at 4:11 PM <<a href="mailto:gabriele.belotti.bergamo@gmail.com">gabriele.belotti.bergamo@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="IT"><div class="gmail-m_858798862090466711WordSection1"><p class="MsoNormal"><span lang="EN-GB">Thanks Simon!<br>My best guess is that the artefact is strongly related to the “theta” dependant weighting in DDF weighting. <br>An interesting fact is that displacing the isocenter projection on the detector less and less, the artefact tends to disappear (see the attached figures as reference).<br>On a smaller note, there is some inconsistency in the inferior/superior image corner calculation between positive and negative isocenter projection displacements of the same entity (say + or - 140), which in turn affect “theta” calculation.<br><br>Thanks a lot for the literature reference, I’ll gladly study it.<br><br>Regarding the code, I’ll transfer the changes to a clone of the current release and share it as soon as possible and we’ll look into optimizing it.<br><br>Best wishes,<br>Gabriele<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><p class="MsoNormal"><b>Da:</b> Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>> <br><b>Inviato:</b> mercoledì 22 gennaio 2020 11.46<br><b>A:</b> <a href="mailto:gabriele.belotti.bergamo@gmail.com" target="_blank">gabriele.belotti.bergamo@gmail.com</a><br><b>Cc:</b> rtk-users <<a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a>><br><b>Oggetto:</b> Re: [Rtk-users] Half Fan dataset<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><div><div><p class="MsoNormal"><span lang="EN-GB">Congratulations! Glad to here it worked out. From your attachment, I have the feeling that something is wrong since there is an artefact at the center. Do you know what that could be?<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-GB">Maybe you can read the Knaup's paper in the 13th fully 3D meeting proceedings (available </span><a href="http://www.fully3d.org/uploadfile/2017/0112/20170112020253842.pdf" target="_blank"><span lang="EN-GB">here</span></a><span lang="EN-GB">): A General Projection Weight for Feldkamp–Type Cone–Beam Image Reconstruction from Arbitrary CT Scan Trajectories.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-GB">Defining optimal weights is difficult because you have two competing criteria: best use of the dose to minimize dose and a smooth weighting (as described by Parker).<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-GB">It might be worth being included but the best would be to do it with minimal code copy. You can share the current code if you want us to have a look.<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-GB">Cheers,<u></u><u></u></span></p></div><div><p class="MsoNormal"><span lang="EN-GB">Simon<u></u><u></u></span></p></div></div><p class="MsoNormal"><span lang="EN-GB"><u></u> <u></u></span></p><div><div><p class="MsoNormal"><span lang="EN-GB">On Tue, Jan 21, 2020 at 5:11 PM <</span><a href="mailto:gabriele.belotti.bergamo@gmail.com" target="_blank"><span lang="EN-GB">gabriele.belotti.bergamo@gmail.com</span></a><span lang="EN-GB">> wrote:<u></u><u></u></span></p></div><blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0cm 0cm 0cm 6pt;margin:5pt 0cm 5pt 4.8pt"><p class="MsoNormal" style="margin-bottom:12pt"><span lang="EN-GB">Dear Simon and Rtk users,<br><br>I picked this topic up again after some time.<br>I was able to properly weight my projections stack in order to accommodate<br>for two different detector displacement in a dual-rotation configuration ( I<br>modified both CPU and GPU implementations of DisplacedDetectorImageFilter )<br>under the same geometry.xml file.<br>Following, it was possible to directly use ParkerShortScanFilter to<br>compensate for the short scan conditions of two successive incomplete<br>rotations.<br><br>The resulting reconstruction can be superimposed on a single-rotation<br>Half-Fan reconstruction with no difference except for a cylindrical artefact<br>which is centred and extends along the Y axis of the reconstructed volume<br>(figure attached).<br>I suspect the weighting I’m using (which is a transposition of the one<br>currently implemented) is not ideal for dual-rotation reconstruction<br>whenever the detector is not fully displaced.<br>However I struggle to find literature on this topic! If you have any<br>suggestion I would be interested in investigating further on this topic, as<br>limited Range of Motion is a key factor in my project.<br><br><br>Of course if you feel this feature could be merged into Rtk tree I would be<br>glad to open a pull request on git and dive more into details.<br><br>Best regards,<br>Gabriele<br><br><br><br>Da: Simon Rit <</span><a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank"><span lang="EN-GB">simon.rit@creatis.insa-lyon.fr</span></a><span lang="EN-GB">> <br>Inviato: giovedì 31 ottobre 2019 00.22<br>A: </span><a href="mailto:gabriele.belotti.bergamo@gmail.com" target="_blank"><span lang="EN-GB">gabriele.belotti.bergamo@gmail.com</span></a><span lang="EN-GB"><br>Cc: rtk-users <</span><a href="mailto:rtk-users@public.kitware.com" target="_blank"><span lang="EN-GB">rtk-users@public.kitware.com</span></a><span lang="EN-GB">><br>Oggetto: Re: [Rtk-users] Half Fan dataset<br><br><br><br>Hi,<br><br>with --proj_iso_x, you only move the detector, not the source. If you also<br>want to move the source, --source_x needs to be used. Hopefully the drawing<br>on the  <</span><a href="http://www.openrtk.org/Doxygen/DocGeo3D.html" target="_blank"><span lang="EN-GB">http://www.openrtk.org/Doxygen/DocGeo3D.html</span></a><span lang="EN-GB">> doc page helps to<br>understand this. So since you don't have any source offset in your geometry<br>file, you are in the first line and last line situation of your drawing<br>image.<br><br>Now, on the last line, what you're actually doing is imaging with the same<br>source arc but actually shifting the detector. This is equivalent to a 180°<br>source rotation with a larger rotation. You only need a weighting function<br>to account for the redundancy but this is not going to be the same one as<br>the one implemented because it needs to be on different side of the<br>detector/projections (as on the first line of your projections). In any<br>case, 180° is not enough, you need at least 180+fan angle and to combine<br>this with a short scan Parker weighting.<br><br>Simon<br><br><br><br>On Wed, Oct 30, 2019 at 6:00 PM <<br><mailto:</span><a href="mailto:gabriele.belotti.bergamo@gmail.com" target="_blank"><span lang="EN-GB">gabriele.belotti.bergamo@gmail.com</span></a><span lang="EN-GB">><br></span><a href="mailto:gabriele.belotti.bergamo@gmail.com" target="_blank"><span lang="EN-GB">gabriele.belotti.bergamo@gmail.com</span></a><span lang="EN-GB">> wrote:<br><br>Hi Simon,<br><br>Sorry for the late reply.<br>I drew a sketch in two part to explain my doubts.<br>First I drew 3 configurations for the geometry, representing my doubt<br>towards what exactly is achieved by Isocenter Projection translation in the<br>RTK geometry; i.e. does it result in a source translation or in a cone beam<br>rotation (in XZ plane) to accommodate for the panel displacement? (I’m<br>expecting the latter but I couldn’t properly check).<br><br>The last two sketches represent the same concept with two of the possible<br>geometries(of course I’d prefer the latter):<br>The idea is to first rotate with the detector displaced on one side by 180°<br>and then displace in the opposite direction and rotate of additional 180°<br>(always clockwise rotation).<br>Any comment or suggestion would be highly appreciated and eventually I will<br>try to impose weights according to improve the reconstruction.<br><br>PS: zoom in on the sketch, the resolution should be sufficient to read<br>PPS: I’m also attaching a screenshot of a reconstruction achieved with the<br>exotic geometry :^] and the xml I generated for it (beware that my detector<br>is 298 mm wide and the displacement is of +/-120 mm)<br><br>Best regards,<br>Gabriele<br><br><br><br>Da: Simon Rit < <mailto:</span><a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank"><span lang="EN-GB">simon.rit@creatis.insa-lyon.fr</span></a><span lang="EN-GB">><br></span><a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank"><span lang="EN-GB">simon.rit@creatis.insa-lyon.fr</span></a><span lang="EN-GB">> <br>Inviato: martedì 29 ottobre 2019 18.21<br>A:  <mailto:</span><a href="mailto:gabriele.belotti.bergamo@gmail.com" target="_blank"><span lang="EN-GB">gabriele.belotti.bergamo@gmail.com</span></a><span lang="EN-GB">><br></span><a href="mailto:gabriele.belotti.bergamo@gmail.com" target="_blank"><span lang="EN-GB">gabriele.belotti.bergamo@gmail.com</span></a><span lang="EN-GB"><br>Cc: rtk-users < <mailto:</span><a href="mailto:rtk-users@public.kitware.com" target="_blank"><span lang="EN-GB">rtk-users@public.kitware.com</span></a><span lang="EN-GB">><br></span><a href="mailto:rtk-users@public.kitware.com" target="_blank"><span lang="EN-GB">rtk-users@public.kitware.com</span></a><span lang="EN-GB">><br>Oggetto: Re: [Rtk-users] Half Fan dataset<br><br><br><br>Hi Gabriele,<br><br>Great that you moved forward.<br><br>It's quite sure that the current implementation does not handle this new<br>exotic geometry. So my suggestion would be to implement your own weights<br>(e.g., using the python package).<br><br>It's not clear to me what you're trying to achieve here but it seems to me<br>that only the central part seen by all source positions has enough data<br>(point of space which see at least 180° of source positions) to be<br>reconstructible. Maybe you should draw your two cones at 90° and -90° to be<br>sure of what you're doing? Don't hesitate to share such a drawing on which<br>we could comment.<br><br>Best regards,<br><br>Simon<br><br><br><br>On Tue, Oct 29, 2019 at 4:10 PM <<br><mailto:</span><a href="mailto:gabriele.belotti.bergamo@gmail.com" target="_blank"><span lang="EN-GB">gabriele.belotti.bergamo@gmail.com</span></a><span lang="EN-GB">><br></span><a href="mailto:gabriele.belotti.bergamo@gmail.com" target="_blank"><span lang="EN-GB">gabriele.belotti.bergamo@gmail.com</span></a><span lang="EN-GB">> wrote:<br><br>Dear Simon and RTK users,<br><br>I’ve been experimenting on the generation of Half Fan CBCT images<br>successfully from reprojections of CTs starting from Simon’s suggestions.<br>So far I was able to reconstruct images by displacing the detector in the X<br>direction (+ or -) and completing a single rotation. Results were good and<br>the FOV was of course larger than the one obtained from using the same<br>virtual detector without displacement.<br><br>I’ve taken the simulation a step further and I’m currently creating a<br>geometry which is similar to the combination of “rtksimulatedgeometry -n 180<br>--proj_iso_x <displacement> -o g_1” and “rtksimulatedgeometry -n 180<br>--proj_iso_x <(-1)*displacement> -o g_2 -f 180” (I’m rotating first between<br>0° and 180° while displacing by half detector size on +X and then 180° and<br>360° while displacing by half detector size on -X).<br>With this single .xml I’m reprojecting a CT into a single .mha using<br>rtkforwardprojections and then I’m using the output as input for rtkfdk.<br><br>My results however suffer from a centered artifact, of semi-cylindrical<br>shape, in my opinion caused by the superimposition of rays from the two<br>beams around the isocenter.<br>This is further supported by the fact that the more I displace the detector<br>the smaller the artefact becomes (of course I can’t displace more than 50%<br>of detector size).<br>I guess a possible solution would be to have a perfect half-cone x-ray beam<br>by shaping it using a collimator, but I’m not sure how to proceed on this in<br>the simulated environment.<br>Have you got any suggestions or observation on how to achieve a<br>reconstruction based on this? (two rotations/acquistion given two opposite<br>detector displacements)<br><br>Thanks in advance,<br>Gabriele<br><br><br><br><br><br><br><br>Da: Simon Rit < <mailto:</span><a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank"><span lang="EN-GB">simon.rit@creatis.insa-lyon.fr</span></a><span lang="EN-GB">><br></span><a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank"><span lang="EN-GB">simon.rit@creatis.insa-lyon.fr</span></a><span lang="EN-GB">> <br>Inviato: venerdì 11 ottobre 2019 13.10<br>A:  <mailto:</span><a href="mailto:gabriele.belotti.bergamo@gmail.com" target="_blank"><span lang="EN-GB">gabriele.belotti.bergamo@gmail.com</span></a><span lang="EN-GB">><br></span><a href="mailto:gabriele.belotti.bergamo@gmail.com" target="_blank"><span lang="EN-GB">gabriele.belotti.bergamo@gmail.com</span></a><span lang="EN-GB"><br>Cc: rtk-users < <mailto:</span><a href="mailto:rtk-users@public.kitware.com" target="_blank"><span lang="EN-GB">rtk-users@public.kitware.com</span></a><span lang="EN-GB">><br></span><a href="mailto:rtk-users@public.kitware.com" target="_blank"><span lang="EN-GB">rtk-users@public.kitware.com</span></a><span lang="EN-GB">><br>Oggetto: Re: [Rtk-users] Half Fan dataset<br><br><br><br>Hi,<br><br>It's easy to generate, you need to offset your detector, either via the RTK<br>geometry or by setting the first coordinate of the origin of your projection<br>to something which makes the projection uncentered. For example, in the<br>geometry :<br><br>rtksimulatedgeometry -n 180 --proj_iso_x 100 -o g<br><br>rtkprojectshepploganphantom -g g -o proj.mha<br><br>rtkfdk -p . -g g -r proj.mha -o fdk.mha<br><br>You can simulate from a CT image by following<br><</span><a href="http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection" target="_blank"><span lang="EN-GB">http://wiki.openrtk.org/index.php/RTK/Scripts/ForwardProjection</span></a><span lang="EN-GB">> this<br>example.<br><br>Simon<br><br><br><br>On Fri, Oct 11, 2019 at 9:58 AM <<br><mailto:</span><a href="mailto:gabriele.belotti.bergamo@gmail.com" target="_blank"><span lang="EN-GB">gabriele.belotti.bergamo@gmail.com</span></a><span lang="EN-GB">><br></span><a href="mailto:gabriele.belotti.bergamo@gmail.com" target="_blank"><span lang="EN-GB">gabriele.belotti.bergamo@gmail.com</span></a><span lang="EN-GB">> wrote:<br><br>Dear RTK users and developers,<br><br>I’m currently experimenting with FDK reconstruction and I’m struggling to<br>find a Half-Fan projection dataset to fiddle around.. Do you know where I<br>can find one? I’ve taken into consideration generating a set of DRRs from an<br>existing phantom. Any help or advice you can give me would be greatly<br>appreciated, thanks!<br><br>Gabriele Belotti<br><br><br><br><br><br>_______________________________________________<br>Rtk-users mailing list<br> <mailto:</span><a href="mailto:Rtk-users@public.kitware.com" target="_blank"><span lang="EN-GB">Rtk-users@public.kitware.com</span></a><span lang="EN-GB">> </span><a href="mailto:Rtk-users@public.kitware.com" target="_blank"><span lang="EN-GB">Rtk-users@public.kitware.com</span></a><span lang="EN-GB"><br> <</span><a href="https://public.kitware.com/mailman/listinfo/rtk-users" target="_blank"><span lang="EN-GB">https://public.kitware.com/mailman/listinfo/rtk-users</span></a><span lang="EN-GB">><br></span><a href="https://public.kitware.com/mailman/listinfo/rtk-users" target="_blank"><span lang="EN-GB">https://public.kitware.com/mailman/listinfo/rtk-users</span></a><span lang="EN-GB"><u></u><u></u></span></p></blockquote></div></div></div></blockquote></div>