<div dir="ltr">You should put a try/catch around reader-&gt;Update(). It may provide for information.<br><br><a href="http://itk.org/Wiki/ITK/Examples/SimpleOperations/TryCatch">http://itk.org/Wiki/ITK/Examples/SimpleOperations/TryCatch</a><br>
<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 27, 2013 at 4:25 PM, Paolo Zaffino <span dir="ltr">&lt;<a href="mailto:p.zaffino@yahoo.it" target="_blank">p.zaffino@yahoo.it</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear ITK community,<br>
I&#39;m facing a strange ITK behavior.<br>
I wrote this code:<br>
<br>
#include &quot;itkImage.h&quot;<br>
#include &quot;itkImageFileReader.h&quot;<br>
#include &quot;itkImageMaskSpatialObject.h&quot;<br>
<br>
int main( int argc, char **argv )<br>
{<br>
  typedef itk::Image&lt;unsigned char,3&gt; ImageType;<br>
  typedef itk::ImageFileReader&lt;<u></u>ImageType&gt; ReaderType;<br>
<br>
  typedef itk::ImageMaskSpatialObject&lt;3&gt; MaskImageType;<br>
  typedef MaskImageType::Pointer MaskTypePointer;<br>
<br>
  ReaderType::Pointer reader = ReaderType::New();<br>
<br>
  reader-&gt;SetFileName( argv[1] );<br>
  reader-&gt;Update();<br>
<br>
  MaskTypePointer mask = MaskImageType::New();<br>
  mask-&gt;SetImage(reader-&gt;<u></u>GetOutput());<br>
<br>
  return 0;<br>
}<br>
<br>
and it compiles without error.<br>
When I try to run the executable I get a segmentation error (core dumped).<br>
What&#39;s is wrong?<br>
I&#39;m using ITK 3.20.1 on a 64 bit Linux box.<br>
If needed I can provide the mask image.<br>
<br>
Thanks a lot for your help.<br>
Best regards.<br>
Paolo<br>
______________________________<u></u>_______<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/<u></u>opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/<u></u>products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_<u></u>FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/<u></u>listinfo/insight-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>