<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello,<div><br></div><div>This sounds like a problem with the ITK ImageIO and not SimpleITK.</div><div><br></div><div>You said that this works with ITKSNAP, what version and what version of ITK does it use?</div><div><br></div><div>I would like to specifically know the file is laid out. The error message is saying it can't load the following file:</div><div><br></div><div><blockquote type="cite"><div>F:<a href="smb://Analyze//c21d6db2eaf740e398a1a50bd1b91a41.hdr">\\Analyze\\c21d6db2eaf740e398a1a50bd1b91a41.hdr</a></div></blockquote></div><div><br></div><div>Does that file exist? Is it the symlink or the actual file?</div><div><br></div><div>I am unfortunately not familiar with the behavior of symlinks on windows. </div><div><br></div><div>Brad</div><div><br></div><div><br><div><div>On Jul 16, 2012, at 11:46 AM, <a href="mailto:r.niklaus@gmx.ch">r.niklaus@gmx.ch</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hello<br><br>We are using SimpleITK to wrap it for usage in C# environment. Everything works perfect if the header (.hdr for Analyze) <br>and source (.img for Analyze) files are "real" available. To find the corresponding source file it must be named the same like the header file.<br><br>private void ReadFile(string path)<br>{<br><span class="Apple-tab-span" style="white-space:pre">        </span>// Read input image<br><span class="Apple-tab-span" style="white-space:pre">        </span>ImageFileReader reader = new ImageFileReader();<br><span class="Apple-tab-span" style="white-space:pre">        </span>reader.SetFileName(path);<br><span class="Apple-tab-span" style="white-space:pre">        </span>this.image = reader.Execute();<br><span class="Apple-tab-span" style="white-space:pre">        </span>reader.Dispose();<br>}<br><br>The methods are provided by SimpleITKCSharpManaged.dll<br><br>Problem: Now we want to use symbolic links for source files. The header is "real" available but the source is a symbolic link pointing <br>to the "real" one. In this case it doesn't work (the header cannot open the source file). It fails at reader.Execute(); with the following <br>message:<br><br>{"Exception thrown in SimpleITK ImageFileReader_Execute: C:<a href="smb://Insight-Toolkit-Temp//ITK_4.0//Modules//IO//NIFTI//src//itkNiftiImageIO.cxx:500:/nitk::ERROR:">\\Insight-Toolkit-Temp\\ITK_4.0\\Modules\\IO\\NIFTI\\src\\itkNiftiImageIO.cxx:500:\nitk::ERROR:</a> NiftiImageIO(09D207D0): nifti_image_load failed for file: F:<a href="smb://Analyze//c21d6db2eaf740e398a1a50bd1b91a41.hdr">\\Analyze\\c21d6db2eaf740e398a1a50bd1b91a41.hdr</a>"}<br><br>Does anyone encountered a similar problem? <br><br>Should it be generally possible to use symbolic links instead of "real" files?<br><br>I have tested the procedure with ITK-SNAP and this tool is able to open symbolic links.<br><br>Thanks in advance for any respondence!<br><br>_____________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-users<br></div></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">========================================================</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Bradley Lowekamp<span class="Apple-converted-space"> </span><span class="Apple-converted-space"> </span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Medical Science and Computing for</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Office of High Performance Computing and Communications</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">National Library of Medicine<span class="Apple-converted-space"> </span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; "><a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a></font></p><br class="Apple-interchange-newline"></span></div></span></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>