<div dir="ltr"><div>Thanks. The problem is that the function SetFileNames expects a list of file. When passing only one string, it converts it to a list of char and tries to open file "C" first. Use<br></div><div><pre style="color:rgb(0,0,0);background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">reader<span style="color:rgb(128,128,48)">.</span>SetFileNames<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,0,230)">["C:/xxx/Proj_0001.<span class="gmail-il">xim</span>"]</span><span style="color:rgb(128,128,48)">)<br></span><span style="font-family:arial,sans-serif"><br>instead. I have also submitted a <a href="https://github.com/SimonRit/RTK/commit/701704760dea06ee97c57121fb504acaed06f42b">patch</a> to avoid the crash but you'll have to wait for the release of new python packages to have the fix on your side.<br></span></pre><pre style="color:rgb(0,0,0);background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span style="font-family:arial,sans-serif">Cheers,<br></span></pre><pre style="color:rgb(0,0,0);background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span style="font-family:arial,sans-serif">Simon<br></span></pre><pre style="color:rgb(0,0,0);background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span style="color:rgb(128,128,48)"></span></pre><pre style="color:rgb(0,0,0);background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span style="color:rgb(128,128,48)"><br></span></pre></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 21, 2019 at 1:03 PM Christian Mørup <<a href="mailto:chrmorup@gmail.com">chrmorup@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Simon, <br><br>I have tried with 3D images as well, however it gives the same result. I have attached one similar projection to this mail. <br><br>Best regards, <br>Christian</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Den tor. 21. nov. 2019 kl. 12.05 skrev Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div>Thanks for reporting, I guess you can open an issue on github. Can you try to see if it works better with 3D images (CPUImageType = rtk.Image[itk.F,3])? We mainly use the projections reader to load a stack of projections. If not, can you share your projection?</div><div>Best regards,</div><div>Simon<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Nov 21, 2019 at 11:50 AM Christian Mørup <<a href="mailto:chrmorup@gmail.com" target="_blank">chrmorup@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi, <br><br>We are currently trying to convert files in .xim-format to .mha-format by using RTK in Python. Our code is as follows:<br><pre style="color:rgb(0,0,0);background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span style="color:rgb(128,0,0);font-weight:bold">import</span> sys
<span style="color:rgb(128,0,0);font-weight:bold">import</span> itk
<span style="color:rgb(128,0,0);font-weight:bold">from</span> itk <span style="color:rgb(128,0,0);font-weight:bold">import</span> RTK <span style="color:rgb(128,0,0);font-weight:bold">as</span> rtk
<span style="color:rgb(128,0,0);font-weight:bold">import</span> inspect
CPUImageType <span style="color:rgb(128,128,48)">=</span> rtk<span style="color:rgb(128,128,48)">.</span>Image<span style="color:rgb(128,128,48)">[</span>itk<span style="color:rgb(128,128,48)">.</span>F<span style="color:rgb(128,128,48)">,</span><span style="color:rgb(0,140,0)">2</span><span style="color:rgb(128,128,48)">]</span>
reader <span style="color:rgb(128,128,48)">=</span> itk<span style="color:rgb(128,128,48)">.</span>ProjectionsReader<span style="color:rgb(128,128,48)">[</span>CPUImageType<span style="color:rgb(128,128,48)">]</span><span style="color:rgb(128,128,48)">.</span>New<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(128,128,48)">)</span>
reader<span style="color:rgb(128,128,48)">.</span>SetFileNames<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,0,230)">"C:/xxx/Proj_0001.xim"</span><span style="color:rgb(128,128,48)">)</span>
reader<span style="color:rgb(128,128,48)">.</span>SetDebug<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(7,71,38)">True</span><span style="color:rgb(128,128,48)">)</span>
<span style="color:rgb(128,0,0);font-weight:bold">print</span><span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,0,230)">"Updating..."</span><span style="color:rgb(128,128,48)">)</span>
reader<span style="color:rgb(128,128,48)">.</span>Update<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(128,128,48)">)</span>
<span style="color:rgb(128,0,0);font-weight:bold">print</span><span style="color:rgb(128,128,48)">(</span><span style="color:rgb(0,0,230)">"Update done"</span><span style="color:rgb(128,128,48)">)</span>
img <span style="color:rgb(128,128,48)">=</span> reader<span style="color:rgb(128,128,48)">.</span>GetOutput<span style="color:rgb(128,128,48)">(</span><span style="color:rgb(128,128,48)">)<br></span></pre><pre style="color:rgb(0,0,0);background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span style="font-family:Arial,Helvetica,sans-serif">For some reason Update() crashes without any stacktrace. Does anyone have any idea why this is happening?
Best regards, </span></pre><pre style="color:rgb(0,0,0);background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial"><span style="font-family:Arial,Helvetica,sans-serif">Christian Mørup</span></pre></div>
_______________________________________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com" target="_blank">Rtk-users@public.kitware.com</a><br>
<a href="https://public.kitware.com/mailman/listinfo/rtk-users" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/rtk-users</a><br>
</blockquote></div>
</blockquote></div>
</blockquote></div>