<div dir="ltr"><div>Hi,</div><div>The conjugate gradient algorithm solves weighted least squares. If you want to use unweighted least squares, simply pass an image filled with ones which has the same size as the projections.</div><div>Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jul 13, 2019 at 8:01 AM Ali ghorbanian <<a href="mailto:e.a.gh72@gmail.com">e.a.gh72@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">Hi,<div>I read the projections of a fan Beam CT by below syntax:</div><div><br></div><div>using ReaderType = itk::ImageSeriesReader< OutputImageType >;<br> ReaderType::Pointer reader = ReaderType::New();<br> const unsigned int first = std::stoi("10000");<br> const unsigned int last = std::stoi("10403");<br> using NameGeneratorType = itk::NumericSeriesFileNames;<br> NameGeneratorType::Pointer nameGenerator = NameGeneratorType::New();<br> nameGenerator->SetSeriesFormat("F:/Data Aqu/98.04.17/Tiff-1/%04d.tiff");<br> nameGenerator->SetStartIndex(first);<br> nameGenerator->SetEndIndex(last);<br> nameGenerator->SetIncrementIndex(1);<br> reader->SetImageIO(itk::TIFFImageIO::New());<br> reader->SetFileNames(nameGenerator->GetFileNames());<br></div><div><br></div><div><a href="https://fastdic.com/word/How" class="gmail-m_6689469078867864826gmail-js-word" style="box-sizing:border-box;background-color:rgb(245,245,245);text-decoration-line:none;color:rgb(77,77,77);font-family:"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;font-size:16px" target="_blank">How</a><span style="color:rgb(0,0,0);font-family:"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;font-size:16px;background-color:rgb(245,245,245)"> </span><a href="https://fastdic.com/word/to" class="gmail-m_6689469078867864826gmail-js-word" style="box-sizing:border-box;background-color:rgb(245,245,245);text-decoration-line:none;color:rgb(77,77,77);font-family:"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;font-size:16px" target="_blank">to</a><span style="color:rgb(0,0,0);font-family:"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;font-size:16px;background-color:rgb(245,245,245)"> </span><a href="https://fastdic.com/word/set" class="gmail-m_6689469078867864826gmail-js-word" style="box-sizing:border-box;background-color:rgb(245,245,245);text-decoration-line:none;color:rgb(77,77,77);font-family:"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;font-size:16px" target="_blank">set</a><span style="color:rgb(0,0,0);font-family:"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;font-size:16px;background-color:rgb(245,245,245)"> </span><a href="https://fastdic.com/word/Ali" class="gmail-m_6689469078867864826gmail-js-word" style="box-sizing:border-box;background-color:rgb(245,245,245);text-decoration-line:none;color:rgb(77,77,77);font-family:"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;font-size:16px" target="_blank">uniformWeightsSource</a><span style="color:rgb(0,0,0);font-family:"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;font-size:16px;background-color:rgb(245,245,245)">'s </span><a href="https://fastdic.com/word/parameter" class="gmail-m_6689469078867864826gmail-js-word" style="box-sizing:border-box;background-color:rgb(245,245,245);text-decoration-line:none;color:rgb(77,77,77);font-family:"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;font-size:16px" target="_blank">parameter</a><span style="color:rgb(0,0,0);font-family:"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;font-size:16px;background-color:rgb(245,245,245)"> </span><a href="https://fastdic.com/word/in" class="gmail-m_6689469078867864826gmail-js-word" style="box-sizing:border-box;background-color:rgb(245,245,245);text-decoration-line:none;color:rgb(77,77,77);font-family:"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;font-size:16px" target="_blank">in</a><span style="color:rgb(0,0,0);font-family:"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;font-size:16px;background-color:rgb(245,245,245)"> </span><a href="https://fastdic.com/word/Reza" class="gmail-m_6689469078867864826gmail-js-word" style="box-sizing:border-box;background-color:rgb(245,245,245);text-decoration-line:none;color:rgb(77,77,77);font-family:"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;font-size:16px" target="_blank">ConjugateGradientConeBeamReconstructionFilter</a><span style="color:rgb(0,0,0);font-family:"Helvetica Neue",Helvetica,Arial,Verdana,sans-serif;font-size:16px;background-color:rgb(245,245,245)">?</span> <br></div><div><br></div><div><br></div><div>typedef rtk::ConjugateGradientConeBeamReconstructionFilter< OutputImageType > ConjugateGradientType;<br> ConjugateGradientType::Pointer conjugategradient = ConjugateGradientType::New();<br> conjugategradient->SetInput(tomographySource->GetOutput());<br> conjugategradient->SetInput(1, reader->GetOutput());<br> conjugategradient->SetInput(2, <b><font color="#f4cccc"><u style="background-color:rgb(255,0,0)">uniformWeightsSource</u></font></b>->GetOutput());<br> conjugategradient->SetGeometry(geometry);<br> conjugategradient->SetNumberOfIterations(1);<br> conjugategradient->SetDisableDisplacedDetectorFilter(true);<br> conjugategradient->SetGamma(1);<br></div><div><br></div><div>Best regards <br></div><div dir="rtl">ذث</div></div>
_______________________________________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com" target="_blank">Rtk-users@public.kitware.com</a><br>
<a href="https://public.kitware.com/mailman/listinfo/rtk-users" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/rtk-users</a><br>
</blockquote></div>