<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Ok, I added the reader-&gt;Update(), but now I'm getting a different error:<br>Segmentation fault<br><br>The program apparently crashes in the for loop. <br><br>I think something might be wrong with lines 64-65, but I'm not sure what.<br>inputImage=reader1-&gt;GetOutput();<br>inputMaskImage=reader2-&gt;GetOutput();<br><br>I attached the code again.<br>Thanks<br><br><br><br>&gt; Date: Sun, 19 Apr 2009 14:57:47 -0400<br>&gt; Subject: Re: [Insight-users] masking part of an image<br>&gt; From: bill.lorensen@gmail.com<br>&gt; To: babygirl_25@hotmail.com<br>&gt; CC: insight-users@itk.org<br>&gt; <br>&gt; Do a reader1-&gt;Update() and reader2-&gt;Update() before accessing the<br>&gt; outputs of the reader.<br>&gt; <br>&gt; 2009/4/19 shoosh moosh &lt;babygirl_25@hotmail.com&gt;:<br>&gt; &gt; Hi,<br>&gt; &gt; I wrote up a program that takes as input 2 images - a 3D image, and a 3D<br>&gt; &gt; binary mask image with 0's in the parts im not interested and 1's in the<br>&gt; &gt; parts I want to segment out. I want the program to simply multiply each<br>&gt; &gt; pixel in the original image with the corresponding pixel in the masking<br>&gt; &gt; image and produce a third image of the same size having only the region<br>&gt; &gt; specified by 1's in the mask. The code compiles, but when I run it, I get<br>&gt; &gt; this error:<br>&gt; &gt;<br>&gt; &gt; terminate called after throwing an instance of 'itk::ExceptionObject'<br>&gt; &gt; &nbsp; what():<br>&gt; &gt; /home/shoosh/InsightToolkit-3.10.2/Code/IO/itkNrrdImageIO.cxx:951:<br>&gt; &gt; itk::ERROR: NrrdImageIO(0x8585a50): Write: Error wrapping nrrd for<br>&gt; &gt; output.nhdr:<br>&gt; &gt; [nrrd] nrrdWrap_nva:<br>&gt; &gt; [nrrd] _nrrdSizeCheck: axis 0 size is zero!<br>&gt; &gt;<br>&gt; &gt; Can some one tell me how to fix it. the code is attached.<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; ________________________________<br>&gt; &gt; Get news, entertainment and everything you care about at Live.com. Check it<br>&gt; &gt; out!<br>&gt; &gt; _____________________________________<br>&gt; &gt; Powered by www.kitware.com<br>&gt; &gt;<br>&gt; &gt; Visit other Kitware open-source projects at<br>&gt; &gt; http://www.kitware.com/opensource/opensource.html<br>&gt; &gt;<br>&gt; &gt; Please keep messages on-topic and check the ITK FAQ at:<br>&gt; &gt; http://www.itk.org/Wiki/ITK_FAQ<br>&gt; &gt;<br>&gt; &gt; Follow this link to subscribe/unsubscribe:<br>&gt; &gt; http://www.itk.org/mailman/listinfo/insight-users<br>&gt; &gt;<br>&gt; &gt;<br><br /><hr />See all the ways you can stay connected <a href='http://www.microsoft.com/windows/windowslive/default.aspx' target='_new'>to friends and family</a></body>
</html>