<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Malgun Gothic";
        panose-1:2 11 5 3 2 0 0 2 0 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@Malgun Gothic";
        panose-1:2 11 5 3 2 0 0 2 0 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Hi Safdary, <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Again, please cc <a href="mailto:rtk-users@openrtk.org">rtk-users@openrtk.org</a> when you send your email, since other users (much better experts than me!) can give us any suggestions.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Thanks.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Yang<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> Yang K Park [mailto:theday79@gmail.com] <br><b>Sent:</b> Monday, June 15, 2015 10:37 AM<br><b>To:</b> 'safdary mohsen'<br><b>Cc:</b> rtk-users@openrtk.org<br><b>Subject:</b> RE: [Rtk-users] error on build rtk in visual studio 2012 when rtk use cuda<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Hi Safdary,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I recommend you to try rtkfdk.exe first (with cuda option) to see if it works for you.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>The example of the command line would be:<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:black'>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='font-size:11.0pt;font-family:"Calibri",sans-serif;color:red'>--hardware cuda<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:red'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>If it works for your image, then you can mimic the original rtkfdk code to make your own one.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Good luck!<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Yang</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:red'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:black'> <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> safdary mohsen [<a href="mailto:ieee.safdary@gmail.com">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<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>Hi Yang</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>I have tried to adjust the window/level to see something inside of the image but all pixels set to zero.</span><o:p></o:p></p><div><p class=MsoNormal><u><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'>My code is:</span></u><o:p></o:p></p></div><div><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>#define</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> </span><span style='font-size:10.0pt;font-family:Consolas;color:#6F008A'>USE_CUDA</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>int</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> main(</span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>int</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> , </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>char</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> **)</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>{<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:green'>//// variable</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>const</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>unsigned</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>int</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> Dimension = 3;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>typedef</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>float</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> </span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>OutputPixelType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>#ifdef</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> </span><span style='font-size:10.0pt;font-family:Consolas;color:#6F008A'>USE_CUDA</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>typedef</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> itk::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>CudaImage</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>< </span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>OutputPixelType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>, Dimension > </span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>OutputImageType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>#else</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>typedef</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> itk::Image< OutputPixelType, Dimension > OutputImageType;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>#endif</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:green'>////////////////////////////////////////////////////////////////////////////////////////////////////</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:green'>// Generate file names of projections</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>itk::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>RegularExpressionSeriesFileNames</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>Pointer</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> names = itk::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>RegularExpressionSeriesFileNames</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>::New();</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>names->SetDirectory(std::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>string</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>(</span><span style='font-size:10.0pt;font-family:Consolas;color:#A31515'>"d://RTK/build/bin/Release/Scan1/"</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>));</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>names->SetRegularExpression(std::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>string</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>(</span><span style='font-size:10.0pt;font-family:Consolas;color:#A31515'>"Proj_.*.hnd"</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>));</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> </span><span style='font-size:10.0pt;font-family:Consolas;color:green'>////////////////////////////////////////////////////////////////////////////////////////////////////</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:green'>//// geometry</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:green'>// Defines the RTK geometry object</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>typedef</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> rtk::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>ThreeDCircularProjectionGeometry</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> </span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>GeometryType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>GeometryType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>Pointer</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> geometry = </span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>GeometryType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>::New();</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:green'>// Projection matrices</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>unsigned</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>int</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> numberOfProjections = 86;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>unsigned</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>int</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> firstAngle = 0;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>unsigned</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>int</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> angularArc = 360;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>unsigned</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>int</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> sid = 1000; </span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>unsigned</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>int</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> sdd = 1200; </span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>int</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> isox = 0; </span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>int</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> isoy = 0 ;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>for</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>(</span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>unsigned</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>int</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> noProj=0; noProj<numberOfProjections; noProj++)</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>{<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>double</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> angle = (</span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>float</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>)firstAngle + (</span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>float</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>)noProj * angularArc / (</span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>float</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>)numberOfProjections;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>geometry->AddProjection(sid,<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>sdd,<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>angle,<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>isox,<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>isoy);<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>}<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:green'>/////////////////////////////////////////////////////////////////////////////////////////////////////</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:green'>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:green'>// Projections reader</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>typedef</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> rtk::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>ProjectionsReader</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>< </span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>OutputImageType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> > </span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>ReaderType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>ReaderType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>Pointer</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> reader = </span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>ReaderType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>::New();</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>reader->SetFileNames(names->GetFileNames());<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:green'>//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// </span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:green'>// Create reconstructed image ////////////////////////////////////</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>typedef</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> rtk::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>ConstantImageSource</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>< </span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>OutputImageType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> > </span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>ConstantImageSourceType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>ConstantImageSourceType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>Pointer</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> ImageSource = </span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>ConstantImageSourceType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>::New();</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>ConstantImageSourceType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>PointType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> origin;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>ConstantImageSourceType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>SizeType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> sizeOutput;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>ConstantImageSourceType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>SpacingType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> spacing;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>origin[0] = -127.75;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>origin[1] = -127.75;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>origin[2] = -127.75;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>  </span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>sizeOutput[0] = 512;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>sizeOutput[1] = 512;<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>sizeOutput[2] = 512;<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>spacing[0] = .5;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>spacing[1] = .5;<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>spacing[2] = .5;<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>ImageSource->SetOrigin( origin );<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>ImageSource->SetSpacing( spacing );<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>ImageSource->SetSize( sizeOutput );<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>ImageSource->SetConstant( 0. ); <o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:green'>// getchar(); //////////////////////////////////////</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:green'>///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// <o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>std::cout << </span><span style='font-size:10.0pt;font-family:Consolas;color:#A31515'>"Performing reconstruction"</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> << std::endl;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:green'>// FDK reconstruction filtering</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:green'>// FDK reconstruction filtering</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>#ifdef</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> </span><span style='font-size:10.0pt;font-family:Consolas;color:#6F008A'>USE_CUDA</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>typedef</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> rtk::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>CudaFDKConeBeamReconstructionFilter</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> </span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>FDKType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>#elif</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> USE_OPENCL</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>typedef</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> rtk::OpenCLFDKConeBeamReconstructionFilter FDKType;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>#else<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>typedef</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> rtk::FDKConeBeamReconstructionFilter< OutputImageType > FDKType;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>#endif<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>FDKType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>Pointer</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> feldkamp = </span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>FDKType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>::New();</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>feldkamp->SetInput( 0, ImageSource->GetOutput() );<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>feldkamp->SetInput( 1, reader->GetOutput());<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>feldkamp->SetGeometry( geometry);<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#6F008A'>TRY_AND_EXIT_ON_ITK_EXCEPTION</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>( feldkamp->Update() );</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>std::cout << </span><span style='font-size:10.0pt;font-family:Consolas;color:#A31515'>"Writing output image"</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> << std::endl;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:green'>// Writer</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>typedef</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> itk::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>Image</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>< </span><span style='font-size:10.0pt;font-family:Consolas;color:blue'>float</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>, 3 > </span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>ImageType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>typedef</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> itk::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>ImageFileWriter</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'><</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>ImageType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>> </span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>WriterType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>WriterType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>::</span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>Pointer</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> writer = </span><span style='font-size:10.0pt;font-family:Consolas;color:#2B91AF'>WriterType</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>::New();</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>writer->SetFileName( </span><span style='font-size:10.0pt;font-family:Consolas;color:#A31515'>"output11.mha"</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> );</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>writer->SetInput( feldkamp->GetOutput() );<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>writer->Update();<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'><o:p> </o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>getchar();<o:p></o:p></span></p><p><span style='font-size:10.0pt;font-family:Consolas;color:blue'>return</span><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'> 0;</span><span style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D'><o:p></o:p></span></p></div></div><div><p><span style='font-size:10.0pt;font-family:Consolas;color:#1F497D'>}</span><o:p></o:p></p></div></div></body></html>