<div dir="ltr"><div>Hi,</div><div>To make air at 0, you need to add the opposite of the air value (1000 for HU) to your image, e.g. with itk::AddImageFilter.</div><div>To shift your image, you can change its origin with itk::ChangeInformationImageFilter.</div><div>Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Aug 22, 2022 at 5:26 PM Adarsh S Sunil <<a href="mailto:adarshto3@gmail.com">adarshto3@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 dir="auto"><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Hi Simon,</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">       Thanks for the support. I tried based on your suggestions.</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">First I tried to align my volume to center by adjusting values in <span style="font-size:9.5pt;font-family:"consolas";color:rgb(255,255,255);line-height:1.5">SetOrigin() and geometry</span><span style="font-size:9.5pt;font-family:"consolas";color:rgb(49,153,153);line-height:1.5">-></span><span style="font-size:9.5pt;font-family:"consolas";color:rgb(255,255,255);line-height:1.5">AddProjection(sid, sdd, 0, 0, 0, angle, 0, 0 , 0).<b></b></span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">But it only shifted the projection even I tried to change offset for source.</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Also I couldn’t find anything that shows how to make the air at 0.</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Could you please suggest a reference which shows how to do them both??</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Thanks and Regards</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Adarsh S S</p></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 18, 2022, 3:29 AM Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</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 dir="ltr"><div>I ran it and the output is not completely black. But you probably need to modify your projections to make the air at 0  (add -1024). You also may want to center your volume, the forward projections look weird currently.<br></div><div>Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 17, 2022 at 8:41 AM Adarsh S Sunil <<a href="mailto:adarshto3@gmail.com" rel="noreferrer" target="_blank">adarshto3@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 dir="ltr"><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Hi,</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">              I’m attaching my code here. I’m trying to get the Forward projection and backward projection from dicom data. </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><br></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:14.6667px">CT input : <a href="https://drive.google.com/drive/folders/1Vc3HfqvfBdtviuVdbBhDQev2ZDEH7NYX?usp=sharing" rel="noreferrer" target="_blank">https://drive.google.com/drive/folders/1Vc3HfqvfBdtviuVdbBhDQev2ZDEH7NYX?usp=sharing</a></span><br></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><br></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Usage: Run from output location on cmd as</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> FirstCudaReconstruction.exe <outputFile.mha> <geoemtry.xml> <CT DICOM directory location></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><br></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Please check it and let me know the problems in it. </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><br></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Thanks and Regards</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Adarsh SS</p><div><div dir="ltr"><div dir="ltr"><div style="font-size:small">Thanks & Regards</div><div style="font-size:small">Adarsh S S</div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 16 Aug 2022 at 19:05, Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" rel="noreferrer" target="_blank">simon.rit@creatis.insa-lyon.fr</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 dir="ltr"><div>Hi,</div><div>Can you maybe share a complete script with an input CT? I also don't understand what's going on but we never get a full picture of what you're doing.<br></div><div>Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 16, 2022 at 3:23 PM Adarsh S Sunil <<a href="mailto:adarshto3@gmail.com" rel="noreferrer" target="_blank">adarshto3@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 dir="ltr"><div dir="auto"><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Hi,</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">         Thank you for the answer.</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">The following is the output for Forward Projection (<span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">ForwardProj</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5">-></span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">GetOutput()</span>) :</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><img src="cid:ii_l6w7skpa0" alt="image002.png" width="467" height="194"><br><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">As you suggested I tried with <span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">changeFilter</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5">-></span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">GetOutput() instead of </span><span style="font-size:9.5pt;font-family:consolas;color:rgb(61,164,46);line-height:1.5">outputImage1 as follows:</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:consolas;color:rgb(190,125,255);line-height:1.5">using</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:consolas;color:rgb(43,145,175);line-height:1.5">BackFilter</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5"> = rtk::</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(43,145,175);line-height:1.5">CudaFDKConeBeamReconstructionFilter</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:consolas;color:rgb(190,125,255);line-height:1.5">auto</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5"> BackProjFilter = </span><span style="font-size:9.5pt;font-family:consolas;color:rgb(43,145,175);line-height:1.5">BackFilter</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">::New();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:consolas;color:rgb(61,164,46);line-height:1.5">// FDK reconstruction</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5"></span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">  std::cout </span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5"><<</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,124,102);line-height:1.5">"Reconstructing..."</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5"><<</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5"> std::endl;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">  BackProjFilter</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5">-></span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">SetInput(0, changeFilter</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5">-></span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">GetOutput());</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">  BackProjFilter</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5">-></span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">SetInput(1, ForwardProj</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5">-></span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">GetOutput());</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">  BackProjFilter</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5">-></span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">SetGeometry(geometry);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">  BackProjFilter</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5">-></span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">Update();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">  BackProjFilter</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5">-></span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">UpdateOutputInformation();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5"> </span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:consolas;color:rgb(61,164,46);line-height:1.5">// Writer</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5"></span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">  std::cout </span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5"><<</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,124,102);line-height:1.5">"Writing output image..."</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5"><<</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5"> std::endl;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:consolas;color:rgb(190,125,255);line-height:1.5">using</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:consolas;color:rgb(43,145,175);line-height:1.5">WriterType</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5"> = itk::</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(43,145,175);line-height:1.5">ImageFileWriter</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5"><</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">>;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:consolas;color:rgb(43,145,175);line-height:1.5">WriterType</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">::</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(43,145,175);line-height:1.5">Pointer</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5"> writer = </span><span style="font-size:9.5pt;font-family:consolas;color:rgb(43,145,175);line-height:1.5">WriterType</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">::New();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">  writer</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5">-></span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">SetFileName(</span><span style="font-size:9.5pt;font-family:consolas;color:gray;line-height:1.5">argv</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">[1]);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">  writer</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5">-></span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">SetInput(BackProjFilter</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5">-></span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">GetOutput());</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">  writer</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5">-></span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">Update();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">But I’m still getting the output <span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">BackProjFilter</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5">-></span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">GetOutput() as a black image.</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><img src="cid:ii_l6w7swu71" alt="image004.png" width="467" height="193"><br><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">I checked the value for <span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">changeFilter</span><span style="font-size:9.5pt;font-family:consolas;color:rgb(49,153,153);line-height:1.5">-></span><span style="font-size:9.5pt;font-family:consolas;color:rgb(255,255,255);line-height:1.5">GetOutput()and it gives the dicom data.</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">I’m using ITK version 5.2.1 and RTK version 2.0. Can you please help me understand why I’m not getting a back projection?  </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Are there any extra options to set for getting the back projection? What do I have to do to get the correct back projection?</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Thanks and Regards</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Adarsh S S</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><br></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><br></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Aug 13, 2022, 10:43 AM Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" rel="noreferrer" target="_blank">simon.rit@creatis.insa-lyon.fr</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 dir="ltr"><div>Your approach is correct and there is no need to do multiple files. The outputImage1 (for backprojection) should have the same information as the tomography (changeFilter->GetOutput()), not the same information as the projections (outputImage). Maybe that's the problem here?<br></div><div>Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 12, 2022 at 2:37 PM Adarsh S Sunil <<a href="mailto:adarshto3@gmail.com" rel="noreferrer noreferrer" target="_blank">adarshto3@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 dir="auto"><div><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Hi,</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">             Thanks for the reply. The outputImage passed as input to the backprojection does not have the same information as reader->GetOutput().</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">I’m writing the forwardProjection in to a single file named Forward.mha.</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  rtk::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ForwardProjectionImageFilter</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"><</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">, </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">>::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">Pointer</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> ForwardProj =</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  rtk::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">CudaForwardProjectionImageFilter</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"><</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">, </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">>::New();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">dynamic_cast</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"><rtk::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">CudaForwardProjectionImageFilter</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"><</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">, </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">> *>(ForwardProj.GetPointer())->SetStepSize(1);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  ForwardProj->SetInput(0, outputImage);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  ForwardProj->SetInput(1, changeFilter->GetOutput());</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  ForwardProj->SetGeometry(geometry);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  ForwardProj->Update();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(61,164,46);line-height:1.5">// Writer</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"></span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  std::cout << </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,124,102);line-height:1.5">"Writing output image..."</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> << std::endl;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">using</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">WriterType1</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> = itk::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageFileWriter</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"><</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">>;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">WriterType1</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">Pointer</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> writer1 = </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">WriterType1</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::New();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  writer1->SetFileName(</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,124,102);line-height:1.5">"Forward.mha"</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  writer1->SetInput(ForwardProj->GetOutput());</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  writer1->Update();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Also, I’m setting  the same regions, spacing, origin etc. to forward and backward projections as follows:</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">using</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">RegionType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> = itk::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageRegion</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"><3>;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">Pointer</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> inputImage = reader->GetOutput();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">RegionType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">         inputRegion = inputImage->GetLargestPossibleRegion();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">Pointer</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> outputImage = </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::New();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">Pointer</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> outputImage1 = </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::New();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">using</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">changeImageFilter</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> = itk::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ChangeInformationImageFilter</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"><</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">>;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">auto</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">                changeFilter = </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">changeImageFilter</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::New();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">double</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">              rotationX = 90;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  itk::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">Versor</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"><</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">double</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">> rotation;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">const</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">double</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">        angleInRadians = rotationX * vnl_math::pi / 180.0;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> rotation.SetRotationAroundY(angleInRadians);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">const</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">DirectionType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> direction = inputImage->GetDirection();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">const</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">DirectionType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> newDirection = direction * rotation.GetMatrix();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  changeFilter->SetOutputDirection(newDirection);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  changeFilter->ChangeAll();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  changeFilter->SetInput(inputImage);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  changeFilter->UpdateOutputInformation();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  changeFilter->Update();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">const</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">unsigned</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">int</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">   NumberOfProjectionImages = 180;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">IndexType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> start;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  start[0] = inputRegion.GetIndex()[0];</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  start[1] = inputRegion.GetIndex()[1];</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  start[2] = inputRegion.GetIndex()[2];</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">RegionType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">SizeType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> size;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  size[0] = inputRegion.GetSize()[0];</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  size[1] = inputRegion.GetSize()[1];</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  size[2] = NumberOfProjectionImages;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">RegionType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> region;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  region.SetSize(size);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  region.SetIndex(start);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">SpacingType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> spacing;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  spacing[0] = inputImage->GetSpacing()[0];</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  spacing[1] = inputImage->GetSpacing()[1];</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  spacing[2] = inputImage->GetSpacing()[2];</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">PointType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> origin;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  origin[0] = inputImage->GetOrigin()[0];</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  origin[1] = inputImage->GetOrigin()[1];</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  origin[2] = inputImage->GetOrigin()[2];</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">//For Forward Projection</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  outputImage->SetRegions(region);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  outputImage->SetSpacing(spacing);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  outputImage->SetOrigin(origin);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  outputImage->Allocate();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  outputImage->FillBuffer(size[0] * size[1] * size[2]);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">//For Backward Projection</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  outputImage1->SetRegions(region);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  outputImage1->SetSpacing(spacing);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  outputImage1->SetOrigin(origin);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  outputImage1->Allocate();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  outputImage1->FillBuffer(size[0] * size[1] * size[2]);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">I tried to give the output of forward projection directly. But it did not work. I was only getting a blank image.</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">So I tried a different approach. I read somewhere that using Projection reader is better. So, I’m trying using projection readers.</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Then I put the Forward Projection reader (<span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">ForwardProj->GetOutput()</span>) as the input of Backward Projection.</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">using</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">FileNamesContainer</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> = std::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">vector</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"><std::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">string</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">>;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">FileNamesContainer</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> fileNames = nameGenerator->GetFileNames(seriesIdentifier);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">using</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ReaderType1</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> = rtk::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ProjectionsReader</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"><</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">>;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ReaderType1</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">Pointer</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> reader1 = </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ReaderType1</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::New();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  reader1->SetFileNames(fileNames);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  reader1->Update();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"></span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">using</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">BackFilter</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> = rtk::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">CudaFDKConeBeamReconstructionFilter</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">auto</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> BackProjFilter = </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">BackFilter</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::New();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(61,164,46);line-height:1.5">// FDK reconstruction</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"></span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  std::cout << </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,124,102);line-height:1.5">"Reconstructing..."</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> << std::endl;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> BackProjFilter->SetInput(0, outputImage1);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  BackProjFilter->SetInput(1, ForwardProj->GetOutput());</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  BackProjFilter->SetGeometry(geometry);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> BackProjFilter->Update();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(61,164,46);line-height:1.5">// Writer</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"></span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  std::cout << </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,124,102);line-height:1.5">"Writing output image..."</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> << std::endl;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(190,125,255);line-height:1.5">using</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">WriterType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> = itk::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageFileWriter</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"><</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">ImageType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">>;</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">WriterType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">Pointer</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5"> writer = </span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(43,145,175);line-height:1.5">WriterType</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">::New();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  writer->SetFileName(</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,124,102);line-height:1.5">"BackImage.mha"</span><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  writer->SetInput(outputImage1);</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"><span style="font-size:9.5pt;font-family:"cascadia mono";color:rgb(255,255,255);line-height:1.5">  writer->Update();</span></p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Still I’m not getting any valid output.</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Is my approach to get backward projection from forward projection correct?</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Do we have to write forward and backward projections to multiple files? Then how to do it?</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> Thanks and regards</p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)">Adarsh S S </p><p style="margin:0cm 0cm 0.0001pt;font-size:11pt;font-family:calibri,sans-serif;color:rgb(225,225,225);background-color:rgb(20,20,20)"> </p><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 12, 2022, 2:16 PM Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" rel="noreferrer noreferrer" target="_blank">simon.rit@creatis.insa-lyon.fr</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 dir="ltr"><div>Hi,</div><div>It should work. UpdateOutputInformation is not required (it's done by Update already). Does the outputImage passed as input to the backprojection have the same information as reader->GetOutput()?</div><div>Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 12, 2022 at 8:57 AM Adarsh S Sunil <<a href="mailto:adarshto3@gmail.com" rel="noreferrer noreferrer noreferrer" target="_blank">adarshto3@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 dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr"><br></div><div dir="ltr"><div>Hi all,</div><div><br></div><div>      I'm a beginner in rtk. I want to use the forward and backward projection in CT images.  For that I defined the RTK geometry object and seriesIdContainer. </div><div><br></div><div>Then I read CT data and assign it to a reader and set it as inputImage. </div><div><br></div><div><i>  while (seriesItr != seriesUID.end())<br></i></div><div><i>  {<br>    seriesIdentifier = seriesItr->c_str();<br>    seriesItr++;<br>    std::cout << "\nReading: ";<br>    std::cout << seriesIdentifier << std::endl;<br>    using FileNamesContainer = std::vector<std::string>;<br>    FileNamesContainer fileNames = nameGenerator->GetFileNames(seriesIdentifier);<br>    using ImageIOType = itk::GDCMImageIO;<br>    auto dicomIO = ImageIOType::New();<br>    reader->SetImageIO(dicomIO);<br>    reader->SetFileNames(fileNames);<br>    reader->ForceOrthogonalDirectionOff(); // properly read CTs with gantry tilt<br>    TRY_AND_EXIT_ON_ITK_EXCEPTION(reader->Update())<br>  }<br></i></div><div><i>  using RegionType =   itk::ImageRegion<3>;<br>  ImageType::Pointer inputImage = reader->GetOutput();<br>  RegionType inputRegion = inputImage->GetLargestPossibleRegion();<br>  ImageType::Pointer outputImage = ImageType::New();</i><br></div><div><br></div><div>Then I created Imageregion and imageFilter for outputImage.</div><div>Then I set the regions, spacing, origin etc.</div><div><br></div><div>Then I get the Forward Projection like the following:</div><div><br></div><div><i>  rtk::ForwardProjectionImageFilter<ImageType, ImageType>::Pointer ForwardProj = rtk::CudaForwardProjectionImageFilter<ImageType, ImageType>::New();<br>  dynamic_cast<rtk::CudaForwardProjectionImageFilter<ImageType, ImageType> *>(ForwardProj.GetPointer()) ->SetStepSize( 1 );<br>  ForwardProj->SetInput( 0, <b>outputImage</b> );<br>  ForwardProj->SetInput( 1, changeFilter->GetOutput());<br>  ForwardProj->SetGeometry( geometry );<br>  ForwardProj->Update();</i><br></div><div><br></div><div>Then I wrote the ForwardProj to an mha file.</div><div><br></div><div>Then I put the output from Forward Projection as input of Back Projection.</div><div>Now I am trying to get the back projection like the following:</div><div><br></div><div><i>  using ReaderType1 = rtk::ProjectionsReader<ImageType>;<br>  ReaderType1::Pointer reader1 = ReaderType1::New();<br>  reader1->SetFileNames( fileNames );<br>  reader1->Update();<br>  using BackFilter = rtk::CudaFDKConeBeamReconstructionFilter;<br>  auto BackProjFilter = BackFilter::New();<br>  // FDK reconstruction<br>  BackProjFilter->SetInput( 0, <b>outputImage</b> );<br>  BackProjFilter->SetInput( 1, reader1->GetOutput() );<br>  BackProjFilter->SetGeometry( geometry );<br>  BackProjFilter->Update();<br>  BackProjFilter->UpdateOutputInformation();</i><br></div><div><br></div><div>But I'm not getting the back projection. Are there any additional options I have to set??</div><div>Is there anything I have missed??</div><br clear="all"><div><div dir="ltr"><div dir="ltr"><div style="font-size:small">Thanks & Regards</div><div style="font-size:small">Adarsh S S</div></div></div></div></div>
</div></div>
_______________________________________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com" rel="noreferrer noreferrer noreferrer" target="_blank">Rtk-users@public.kitware.com</a><br>
<a href="https://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users" rel="noreferrer noreferrer noreferrer noreferrer" target="_blank">https://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users</a><br>
</blockquote></div>
</blockquote></div></div></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>
</blockquote></div>