<div dir="ltr"><div><div>Hi,<br></div>Did you look at your projections to check that they were adequately processed by the ProjectionsReader? If the projections are ok, then this is probably a geometry problem.<br></div>Simon<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 15, 2015 at 5:19 PM, safdary mohsen <span dir="ltr"><<a href="mailto:ieee.safdary@gmail.com" target="_blank">ieee.safdary@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="MsoNormal"><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:11pt">Hi Yang</span></div><div class="MsoNormal"><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:11pt"><br></span></div><div class="MsoNormal"><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:11pt"><br></span></div><div class="MsoNormal"><span style="color:rgb(31,73,125);font-family:Calibri,sans-serif;font-size:11pt"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.66px"><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt">I am use rtkfdk.exe but the results are same as my code, </span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt">means all pixels are zero!!!</span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u><br></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt">regards</span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt">safdari</span></p></span></span></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 15, 2015 at 7:10 PM, Yang K Park <span dir="ltr"><<a href="mailto:theday79@gmail.com" target="_blank">theday79@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div vlink="purple" link="blue" lang="EN-US"><div><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt">Hi Safdary, <u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt">Again, please cc <a href="mailto:rtk-users@openrtk.org" target="_blank">rtk-users@openrtk.org</a> when you send your email, since other users (much better experts than me!) can give us any suggestions.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt">Thanks.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt">Yang<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u> <u></u></span></p><div><div style="border-width:1pt medium medium;border-style:solid none none;border-color:rgb(225,225,225) currentColor currentColor;padding:3pt 0in 0in"><p class="MsoNormal"><b><span style="font-family:"Calibri",sans-serif;font-size:11pt">From:</span></b><span style="font-family:"Calibri",sans-serif;font-size:11pt"> Yang K Park [mailto:<a href="mailto:theday79@gmail.com" target="_blank">theday79@gmail.com</a>] <br><b>Sent:</b> Monday, June 15, 2015 10:37 AM<br><b>To:</b> 'safdary mohsen'<br><b>Cc:</b> <a href="mailto:rtk-users@openrtk.org" target="_blank">rtk-users@openrtk.org</a><br><b>Subject:</b> RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda<u></u><u></u></span></p></div></div><div><div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt">Hi Safdary,<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt">I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt">The example of the command line would be:<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:black;font-family:"Calibri",sans-serif;font-size:11pt">rtkfdk --geometry geom.xml --path proj_dir --regexp .*.his --output test_output.mha --verbos --spacing 1,1,1 --dimension 512,10,512 --origin -127.875,29.5,-127.875 </span><span style="color:red;font-family:"Calibri",sans-serif;font-size:11pt">--hardware cuda<u></u><u></u></span></p><p class="MsoNormal"><span style="color:red;font-family:"Calibri",sans-serif;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt">If it works for your image, then you can mimic the original rtkfdk code to make your own one.<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt">Good luck!<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt">Yang</span><span style="color:red;font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p class="MsoNormal"><span style="color:black;font-family:"Calibri",sans-serif;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:black;font-family:"Calibri",sans-serif;font-size:11pt"> <u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u> <u></u></span></p><p class="MsoNormal"><b><span style="font-family:"Calibri",sans-serif;font-size:11pt">From:</span></b><span style="font-family:"Calibri",sans-serif;font-size:11pt"> safdary mohsen [<a href="mailto:ieee.safdary@gmail.com" target="_blank">mailto:ieee.safdary@gmail.com</a>] <br><b>Sent:</b> Saturday, June 13, 2015 11:58 PM<br><b>To:</b> Yang K Park<br><b>Subject:</b> Re: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt">Hi Yang</span><u></u><u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"> </span><u></u><u></u></p><p class="MsoNormal"><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt">I have tried to adjust the window/level to see something inside of the image but all pixels set to zero.</span><u></u><u></u></p><div><p class="MsoNormal"><u><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt">My code is:</span></u><u></u><u></u></p></div><div><p><span style="color:blue;font-family:Consolas;font-size:10pt">#define</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> </span><span style="color:rgb(111,0,138);font-family:Consolas;font-size:10pt">USE_CUDA</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">int</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> main(</span><span style="color:blue;font-family:Consolas;font-size:10pt">int</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> , </span><span style="color:blue;font-family:Consolas;font-size:10pt">char</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> **)</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">{<u></u><u></u></span></p><p><span style="color:green;font-family:Consolas;font-size:10pt">//// variable</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">const</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> </span><span style="color:blue;font-family:Consolas;font-size:10pt">unsigned</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> </span><span style="color:blue;font-family:Consolas;font-size:10pt">int</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> Dimension = 3;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">typedef</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> </span><span style="color:blue;font-family:Consolas;font-size:10pt">float</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> </span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">OutputPixelType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">#ifdef</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> </span><span style="color:rgb(111,0,138);font-family:Consolas;font-size:10pt">USE_CUDA</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">typedef</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> itk::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">CudaImage</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">< </span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">OutputPixelType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">, Dimension > </span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">OutputImageType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">#else</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">typedef</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> itk::Image< OutputPixelType, Dimension > OutputImageType;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">#endif</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:green;font-family:Consolas;font-size:10pt">////////////////////////////////////////////////////////////////////////////////////////////////////</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:green;font-family:Consolas;font-size:10pt">// Generate file names of projections</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">itk::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">RegularExpressionSeriesFileNames</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">Pointer</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> names = itk::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">RegularExpressionSeriesFileNames</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">::New();</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">names->SetDirectory(std::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">string</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">(</span><span style="color:rgb(163,21,21);font-family:Consolas;font-size:10pt">"d://RTK/build/bin/Release/Scan1/"</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">));</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">names->SetRegularExpression(std::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">string</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">(</span><span style="color:rgb(163,21,21);font-family:Consolas;font-size:10pt">"Proj_.*.hnd"</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">));</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> </span><span style="color:green;font-family:Consolas;font-size:10pt">////////////////////////////////////////////////////////////////////////////////////////////////////</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:green;font-family:Consolas;font-size:10pt">//// geometry</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:green;font-family:Consolas;font-size:10pt">// Defines the RTK geometry object</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">typedef</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> rtk::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">ThreeDCircularProjectionGeometry</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> </span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">GeometryType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">GeometryType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">Pointer</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> geometry = </span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">GeometryType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">::New();</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:green;font-family:Consolas;font-size:10pt">// Projection matrices</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">unsigned</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> </span><span style="color:blue;font-family:Consolas;font-size:10pt">int</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> numberOfProjections = 86;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">unsigned</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> </span><span style="color:blue;font-family:Consolas;font-size:10pt">int</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> firstAngle = 0;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">unsigned</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> </span><span style="color:blue;font-family:Consolas;font-size:10pt">int</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> angularArc = 360;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">unsigned</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> </span><span style="color:blue;font-family:Consolas;font-size:10pt">int</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> sid = 1000; </span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">unsigned</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> </span><span style="color:blue;font-family:Consolas;font-size:10pt">int</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> sdd = 1200; </span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">int</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> isox = 0; </span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">int</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> isoy = 0 ;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">for</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">(</span><span style="color:blue;font-family:Consolas;font-size:10pt">unsigned</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> </span><span style="color:blue;font-family:Consolas;font-size:10pt">int</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> noProj=0; noProj<numberOfProjections; noProj++)</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">{<u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">double</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> angle = (</span><span style="color:blue;font-family:Consolas;font-size:10pt">float</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">)firstAngle + (</span><span style="color:blue;font-family:Consolas;font-size:10pt">float</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">)noProj * angularArc / (</span><span style="color:blue;font-family:Consolas;font-size:10pt">float</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">)numberOfProjections;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">geometry->AddProjection(sid,<u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">sdd,<u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">angle,<u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">isox,<u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">isoy);<u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">}<u></u><u></u></span></p><p><span style="color:green;font-family:Consolas;font-size:10pt">/////////////////////////////////////////////////////////////////////////////////////////////////////</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:green;font-family:Consolas;font-size:10pt">///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:green;font-family:Consolas;font-size:10pt">// Projections reader</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">typedef</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> rtk::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">ProjectionsReader</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">< </span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">OutputImageType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> > </span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">ReaderType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">ReaderType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">Pointer</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> reader = </span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">ReaderType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">::New();</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">reader->SetFileNames(names->GetFileNames());<u></u><u></u></span></p><p><span style="color:green;font-family:Consolas;font-size:10pt">//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// </span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:green;font-family:Consolas;font-size:10pt">// Create reconstructed image ////////////////////////////////////</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">typedef</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> rtk::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">ConstantImageSource</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">< </span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">OutputImageType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> > </span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">ConstantImageSourceType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">ConstantImageSourceType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">Pointer</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> ImageSource = </span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">ConstantImageSourceType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">::New();</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">ConstantImageSourceType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">PointType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> origin;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">ConstantImageSourceType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">SizeType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> sizeOutput;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">ConstantImageSourceType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">SpacingType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> spacing;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">origin[0] = -127.75;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">origin[1] = -127.75;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">origin[2] = -127.75;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> </span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">sizeOutput[0] = 512;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">sizeOutput[1] = 512;<u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">sizeOutput[2] = 512;<u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">spacing[0] = .5;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">spacing[1] = .5;<u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">spacing[2] = .5;<u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">ImageSource->SetOrigin( origin );<u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">ImageSource->SetSpacing( spacing );<u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">ImageSource->SetSize( sizeOutput );<u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">ImageSource->SetConstant( 0. ); <u></u><u></u></span></p><p><span style="color:green;font-family:Consolas;font-size:10pt">// getchar(); //////////////////////////////////////</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:green;font-family:Consolas;font-size:10pt">///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// <u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">std::cout << </span><span style="color:rgb(163,21,21);font-family:Consolas;font-size:10pt">"Performing reconstruction"</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> << std::endl;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:green;font-family:Consolas;font-size:10pt">// FDK reconstruction filtering</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:green;font-family:Consolas;font-size:10pt">// FDK reconstruction filtering</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">#ifdef</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> </span><span style="color:rgb(111,0,138);font-family:Consolas;font-size:10pt">USE_CUDA</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">typedef</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> rtk::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">CudaFDKConeBeamReconstructionFilter</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> </span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">FDKType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">#elif</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> USE_OPENCL</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">typedef</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> rtk::OpenCLFDKConeBeamReconstructionFilter FDKType;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">#else<u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">typedef</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">#endif<u></u><u></u></span></p><p><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">FDKType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">Pointer</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> feldkamp = </span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">FDKType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">::New();</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">feldkamp->SetInput( 0, ImageSource->GetOutput() );<u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">feldkamp->SetInput( 1, reader->GetOutput());<u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">feldkamp->SetGeometry( geometry);<u></u><u></u></span></p><p><span style="color:rgb(111,0,138);font-family:Consolas;font-size:10pt">TRY_AND_EXIT_ON_ITK_EXCEPTION</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">( feldkamp->Update() );</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">std::cout << </span><span style="color:rgb(163,21,21);font-family:Consolas;font-size:10pt">"Writing output image"</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> << std::endl;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:green;font-family:Consolas;font-size:10pt">// Writer</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">typedef</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> itk::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">Image</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">< </span><span style="color:blue;font-family:Consolas;font-size:10pt">float</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">, 3 > </span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">ImageType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">typedef</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> itk::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">ImageFileWriter</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"><</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">ImageType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">> </span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">WriterType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">WriterType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">::</span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">Pointer</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> writer = </span><span style="color:rgb(43,145,175);font-family:Consolas;font-size:10pt">WriterType</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">::New();</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">writer->SetFileName( </span><span style="color:rgb(163,21,21);font-family:Consolas;font-size:10pt">"output11.mha"</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> );</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">writer->SetInput( feldkamp->GetOutput() );<u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">writer->Update();<u></u><u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"><u></u> <u></u></span></p><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">getchar();<u></u><u></u></span></p><p><span style="color:blue;font-family:Consolas;font-size:10pt">return</span><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt"> 0;</span><span style="color:rgb(31,73,125);font-family:"Calibri",sans-serif;font-size:11pt"><u></u><u></u></span></p></div></div><div><p><span style="color:rgb(31,73,125);font-family:Consolas;font-size:10pt">}</span><u></u><u></u></p></div></div></div></div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com">Rtk-users@public.kitware.com</a><br>
<a href="http://public.kitware.com/mailman/listinfo/rtk-users" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/rtk-users</a><br>
<br></blockquote></div><br></div>