<div dir="ltr">Dear RTK.User,<div><br></div><div><div style="font-size:12.800000190734863px">I'm using python wrapped version of RTK.<br><div><br></div><div>I used the only example of that for reconstruction.It works perfectly.</div><div><span style="color:rgb(36,39,41);font-family:arial,'helvetica neue',helvetica,sans-serif;font-size:13px">The problem is that I need to simulate an artifact on projection 2D images, so first I got each 2D images of stack reiImage by <b>srtk.GetArrayFromImage(<wbr>reiImage) </b>and then I applied a polynomial on that to simulate an artifact.NOW need to extract these artifacted-images again to the simpleRTK image to be able to reconstruct it at the end. I thought maybe <b>srtk.GetImageFromArray</b> w<wbr>orks, but it doesn't.Can you pls help me.I'm really hopeless.</span><br></div><div><span style="color:rgb(36,39,41);font-family:arial,'helvetica neue',helvetica,sans-serif;font-size:13px"><br></span></div><div><span style="color:rgb(36,39,41);font-family:arial,'helvetica neue',helvetica,sans-serif;font-size:13px">Here is the Example;</span></div><div><pre class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-de1" style="white-space:pre-wrap;font-size:14px;padding:0px;border:0px none white;color:rgb(0,0,0);line-height:1.2em;margin-top:0px;margin-bottom:0px;background-image:none;vertical-align:top;font-family:monospace,'courier new'"><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw1" style="color:rgb(255,119,0);font-weight:bold">from</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw3" style="color:rgb(220,20,60)">__future__</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw1" style="color:rgb(255,119,0);font-weight:bold">import</span> print_function
<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw1" style="color:rgb(255,119,0);font-weight:bold">import</span> SimpleRTK <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw1" style="color:rgb(255,119,0);font-weight:bold">as</span> srtk
<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw1" style="color:rgb(255,119,0);font-weight:bold">import</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw3" style="color:rgb(220,20,60)">sys</span>
<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw1" style="color:rgb(255,119,0);font-weight:bold">import</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw3" style="color:rgb(220,20,60)">os</span>
<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw1" style="color:rgb(255,119,0);font-weight:bold">import</span> matplotlib.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">pyplot</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw1" style="color:rgb(255,119,0);font-weight:bold">as</span> plt
<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw1" style="color:rgb(255,119,0);font-weight:bold">import</span> matplotlib.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">cm</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw1" style="color:rgb(255,119,0);font-weight:bold">as</span> cm
<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw1" style="color:rgb(255,119,0);font-weight:bold">if</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw2" style="color:rgb(0,128,0)">len</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw3" style="color:rgb(220,20,60)">sys</span>.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">argv</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)"><</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">2</span>:
<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw1" style="color:rgb(255,119,0);font-weight:bold">print</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-st0" style="color:rgb(72,61,139)">"Usage: RTKFirstReconstruction <output>"</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw3" style="color:rgb(220,20,60)">sys</span>.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">exit</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">1</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-co1" style="color:rgb(128,128,128);font-style:italic"># Defines the RTK geometry object</span>
geometry <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> srtk.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">ThreeDCircularProjectionG<wbr>eometry</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
numberOfProjections <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">360</span>
firstAngle <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">0</span>
angularArc <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">360</span>
sid <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">600</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-co1" style="color:rgb(128,128,128);font-style:italic"># source to isocenter distance in mm</span>
sdd <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">1200</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-co1" style="color:rgb(128,128,128);font-style:italic"># source to detector distance in mm</span>
isox <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">0</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-co1" style="color:rgb(128,128,128);font-style:italic"># X coordinate on the projection image of isocenter</span>
isoy <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">0</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-co1" style="color:rgb(128,128,128);font-style:italic"># Y coordinate on the projection image of isocenter</span>
<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw1" style="color:rgb(255,119,0);font-weight:bold">for</span> x <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw1" style="color:rgb(255,119,0);font-weight:bold">in</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw2" style="color:rgb(0,128,0)">range</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">0</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span>numberOfProjections<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>:
angle <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> firstAngle + x * angularArc / numberOfProjections
geometry.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">AddProjection</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span>sid<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span>sdd<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)"><wbr>,</span>angle<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span>isox<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span>isoy<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
constantImageSource <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> srtk.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">ConstantImageSource</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
origin <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">[</span> -<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">127.5</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span> -<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">127.5</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">0</span>. <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">]</span>
sizeOutput <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">[</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">256</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">256</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span> numberOfProjections <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">]</span>
spacing <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">[</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">1.0</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">1.0</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">1.0</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">]</span>
constantImageSource.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetOrigin</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span> origin <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
constantImageSource.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetSpacing</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0"><wbr>(</span> spacing <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
constantImageSource.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetSize</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span> sizeOutput <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
constantImageSource.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetConstan<wbr>t</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">0.0</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
source <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> constantImageSource.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">Execute</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
rei <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> srtk.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">RayEllipsoidIntersectionI<wbr>mageFilter</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
semiprincipalaxis <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">[</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">50</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">50</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">50</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">]</span>
center <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">[</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">0</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">0</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">0</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">]</span>
<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-co1" style="color:rgb(128,128,128);font-style:italic"># Set GrayScale value, axes, center...</span>
rei.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetDensity</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">20</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
rei.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetAngle</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">0</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
rei.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetCenter</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span>center<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
rei.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetAxis</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span>semiprincipalaxis<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
rei.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetGeometry</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span> geometry <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
reiImage <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> rei.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">Execute</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span>source<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-co1" style="color:rgb(128,128,128);font-style:italic"># Create reconstructed image</span>
constantImageSource2 <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> srtk.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">ConstantImageSource</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
origin <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">[</span> -<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">63.5</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span> -<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">63.5</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span> -<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">63.5</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">]</span>
sizeOutput <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">[</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">128</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">128</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">128</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">]</span>
constantImageSource2.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetOrigin</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0"><wbr>(</span> origin <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
constantImageSource2.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetSpacin<wbr>g</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span> spacing <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
constantImageSource2.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetSize</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span> sizeOutput <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
constantImageSource2.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetConsta<wbr>nt</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">0.0</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
source2 <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> constantImageSource2.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">Execute</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw1" style="color:rgb(255,119,0);font-weight:bold">print</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-st0" style="color:rgb(72,61,139)">"Performing reconstruction"</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
feldkamp <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> srtk.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">FDKConeBeamReconstruction<wbr>Filter</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
feldkamp.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetGeometry</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span> geometry <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">;</span>
feldkamp.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetTruncationCorrecti<wbr>on</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">0.0</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">;</span>
feldkamp.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetHannCutFrequency</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">0<wbr>.0</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">;</span>
image <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> feldkamp.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">Execute</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span>source2<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span>reiIm<wbr>age<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw1" style="color:rgb(255,119,0);font-weight:bold">print</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-st0" style="color:rgb(72,61,139)">"Masking field-of-view"</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
fov <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> srtk.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">FieldOfViewImageFilter</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
fov.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetGeometry</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span>geometry<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
fov.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetProjectionsStack</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span>reiIma<wbr>ge<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
image <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> fov.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">Execute</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span>image<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
plt.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">imshow</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span>srtk.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">GetArrayFromIm<wbr>age</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span>image<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">[</span>:<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">64</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span>:<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">]</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">,</span> cmap <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> cm.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">Greys_r</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
plt.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">show</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
writer <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">=</span> srtk.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">ImageFileWriter</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
writer.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">SetFileName</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-kw3" style="color:rgb(220,20,60)">sys</span>.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">argv</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">[</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-nu0" style="color:rgb(255,69,0)">1</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">]</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span>
writer.<span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-me1">Execute</span> <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">(</span> image <span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-br0">)</span><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)">;</span></pre><pre class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-de1" style="white-space:pre-wrap;font-size:14px;padding:0px;border:0px none white;color:rgb(0,0,0);line-height:1.2em;margin-top:0px;margin-bottom:0px;background-image:none;vertical-align:top;font-family:monospace,'courier new'"><span class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-sy0" style="color:rgb(102,204,102)"><a href="http://wiki.openrtk.org/index.php/SimpleRTK" target="_blank">http://wiki.openrtk.org/index.<wbr>php/SimpleRTK</a><br></span></pre><pre class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-de1" style="white-space:pre-wrap;font-size:14px;padding:0px;border:0px none white;color:rgb(0,0,0);line-height:1.2em;margin-top:0px;margin-bottom:0px;background-image:none;vertical-align:top;font-family:monospace,'courier new'"><br></pre><pre class="gmail-m_8473466661053406696gmail-m_4744435712807139958gmail-de1" style="white-space:pre-wrap;font-size:14px;padding:0px;border:0px none white;color:rgb(0,0,0);line-height:1.2em;margin-top:0px;margin-bottom:0px;background-image:none;vertical-align:top;font-family:monospace,'courier new'">Thank you in advance.</pre></div></div><div style="font-size:12.800000190734863px"><span style="color:rgb(36,39,41);font-family:arial,'helvetica neue',helvetica,sans-serif;font-size:13px"><br></span></div><div style="font-size:12.800000190734863px"><span style="color:rgb(36,39,41);font-family:arial,'helvetica neue',helvetica,sans-serif;font-size:13px">Best regards,</span></div><div style="font-size:12.800000190734863px"><span style="color:rgb(36,39,41);font-family:arial,'helvetica neue',helvetica,sans-serif;font-size:13px">Sareh Borhani</span></div></div></div>