<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=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:NSimSun;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:SimSun;}
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;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
 /* Page Definitions */
 @page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
        {page:Section1;}
-->
</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=ZH-CN link=blue vlink=purple style='text-justify-trim:punctuation'>

<div class=Section1>

<p class=MsoNormal><span lang=EN-US>Hello all, <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp; I tried to read a .nii
file, but when debug reader-&gt;Update(), an exception happened. Could anyone
help me ?<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US>&nbsp;&nbsp;&nbsp;
</span><span lang=EN-US style='font-family:NSimSun;color:blue'>try</span><span
lang=EN-US style='font-family:NSimSun'><o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-family:NSimSun'>&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-family:NSimSun'>&nbsp;&nbsp;&nbsp;&nbsp;
fixedImageReader-&gt;Update();<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-family:NSimSun'>&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-family:NSimSun'>&nbsp; <span style='color:blue'>catch</span>(
itk::ExceptionObject &amp; excp )<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-family:NSimSun'>&nbsp;&nbsp;&nbsp; {<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-family:NSimSun'>&nbsp;&nbsp;&nbsp; std::cerr &lt;&lt; <span
style='color:#A31515'>&quot;Exception thrown while reading the image&quot;</span>
&lt;&lt; std::endl;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-family:NSimSun'>&nbsp;&nbsp;&nbsp; std::cerr &lt;&lt; excp &lt;&lt;
std::endl;<o:p></o:p></span></p>

<p class=MsoNormal style='text-autospace:none'><span lang=EN-US
style='font-family:NSimSun'>&nbsp;&nbsp;&nbsp; }<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp; Exception thrown while
reading the image<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>itk::ImageFileReaderException
(0044F158) Location: <o:p></o:p></span></p>

<p class=MsoNormal style='text-indent:21.0pt'><span lang=EN-US>&quot;void
__thiscall itk::ImageFileReader&lt;class itk::Image&lt;short,3&gt;,class<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>itk::DefaultConvertPixelTraits&lt;short&gt;
&gt;::GenerateOutputInformation(void)&quot;<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>File: c:\program files
(x86)\itk\include\itk-4.2\itkimagefilereader.hxx<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Line: 143<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>Description:&nbsp; Could not create IO
object for file E:\Atlas\data_case5.nii<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>&nbsp; Tried to create one of the
following:<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>&nbsp; You probably failed to set a file
suffix, or<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp; set the suffix to an
unsupported type.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp;&nbsp; <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span lang=EN-US>&nbsp;&nbsp; Actually, I used itk\Examples\IO\ImageReadWrite.cxx
to read the same .nii file, &nbsp;it could be read out rightly. <o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:0cm'><span lang=EN-US style='font-family:"Arial","sans-serif"'>I
am using:<o:p></o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:0cm'><span lang=EN-US style='font-family:"Arial","sans-serif"'>&nbsp;-
VS 2010<o:p></o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:0cm'><span lang=EN-US style='font-family:"Arial","sans-serif"'>&nbsp;-
Windows 7 64 bit.&nbsp;<o:p></o:p></span></p>

<p class=MsoNormal style='mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:
12.0pt;margin-left:0cm'><span lang=EN-US style='font-family:"Arial","sans-serif"'>and
the platform I build my C++ projects is Win32.<o:p></o:p></span></p>

<p class=MsoNormal><span lang=EN-US style='font-family:"Calibri","sans-serif"'><o:p>&nbsp;</o:p></span></p>

</div>

</body>

</html>