<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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">dynamic_cast</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(61,164,46)!important;line-height:1.5">// Writer</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;line-height:1.5"> std::cout << </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,124,102)!important;line-height:1.5">"Writing output image..."</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">using</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;line-height:1.5"> writer1->SetFileName(</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,124,102)!important;line-height:1.5">"Forward.mha"</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;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)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">using</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">using</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;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)!important;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)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">auto</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">double</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;line-height:1.5"><</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">double</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">const</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">double</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">const</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;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)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">const</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">const</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">unsigned</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">int</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;line-height:1.5">using</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">using</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">using</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;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)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">auto</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(61,164,46)!important;line-height:1.5">// FDK reconstruction</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;line-height:1.5"> std::cout << </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,124,102)!important;line-height:1.5">"Reconstructing..."</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(61,164,46)!important;line-height:1.5">// Writer</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;line-height:1.5"> std::cout << </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,124,102)!important;line-height:1.5">"Writing output image..."</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;line-height:1.5"> </span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(190,125,255)!important;line-height:1.5">using</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;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)!important;line-height:1.5"> writer->SetFileName(</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,124,102)!important;line-height:1.5">"BackImage.mha"</span><span style="font-size:9.5pt;font-family:'cascadia mono';color:rgb(255,255,255)!important;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)!important;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)!important;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">simon.rit@creatis.insa-lyon.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;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" target="_blank" rel="noreferrer">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" target="_blank" rel="noreferrer">Rtk-users@public.kitware.com</a><br>
<a href="https://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users" rel="noreferrer noreferrer" target="_blank">https://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users</a><br>
</blockquote></div>
</blockquote></div></div></div>