Ow Lord! Many thanks, David.<br clear="all"><b>Matheus Viana<br><i>Computational Physics</i><br><i>IFSC-USP</i></b><br>
<br><br><div class="gmail_quote">2012/1/10 David Gobbi <span dir="ltr">&lt;<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The error is due to an uninitialized pointer:<br>
<br>
vtkImageEuclideanDistance *Transform;<br>
<br>
Should be:<br>
<br>
vtkImageEuclideanDistance *Transform = vtkImageEuclideanDistance::New();<br>
<br>
 - David<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Tue, Jan 10, 2012 at 1:14 PM, Matheus Viana &lt;<a href="mailto:vianamp@gmail.com">vianamp@gmail.com</a>&gt; wrote:<br>
&gt; Dear David and Sean,<br>
&gt;<br>
&gt; I&#39;m using LLVM 3.0 without any special flag.<br>
&gt;<br>
&gt; My code is the following:<br>
&gt;<br>
&gt; vtkStructuredPointsReader *StructuredDataset =<br>
&gt; vtkStructuredPointsReader::New();<br>
&gt;<br>
&gt; StructuredDataset -&gt; SetFileName(filename);<br>
&gt;<br>
&gt; StructuredDataset -&gt; Update();<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; vtkImageCast *Cast = vtkImageCast::New();<br>
&gt;<br>
&gt; Cast -&gt; SetOutputScalarTypeToUnsignedChar();<br>
&gt;<br>
&gt; Cast -&gt; SetInputConnection(StructuredDataset-&gt;GetOutputPort());<br>
&gt;<br>
&gt; Cast -&gt; Update();<br>
&gt;<br>
&gt;<br>
&gt; vtkImageEuclideanDistance *Transform;<br>
&gt;<br>
&gt; Transform -&gt; SetInputConnection(Cast-&gt;GetOutputPort());<br>
&gt;<br>
&gt;<br>
&gt; The last line produces the error: &quot;illegal instruction&quot;<br>
&gt;<br>
&gt; Thanks,<br>
&gt;<br>
&gt; Matheus Viana<br>
&gt; Computational Physics<br>
&gt; IFSC-USP<br>
&gt;<br>
&gt;<br>
&gt; 2012/1/10 Sean McBride &lt;<a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Tue, 10 Jan 2012 11:53:17 -0200, Matheus Viana said:<br>
&gt;&gt;<br>
&gt;&gt; &gt;Is anyone using vtk 5.8 on MAC OS Lion?<br>
&gt;&gt;<br>
&gt;&gt; We are.<br>
&gt;&gt;<br>
&gt;&gt; &gt;I&#39;m trying to, but I&#39;m getting some<br>
&gt;&gt; &gt;&quot;illegal instruction&quot; errors. More specifically when I use the class<br>
&gt;&gt; &gt;vtkImageEuclideanDistance.<br>
&gt;&gt;<br>
&gt;&gt; Which compiler did you build with?  Any special flags used?<br>
&gt;&gt;<br>
&gt;&gt; --<br>
&gt;&gt; ____________________________________________________________<br>
&gt;&gt; Sean McBride, B. Eng                 <a href="mailto:sean@rogue-research.com">sean@rogue-research.com</a><br>
&gt;&gt; Rogue Research                        <a href="http://www.rogue-research.com" target="_blank">www.rogue-research.com</a><br>
&gt;&gt; Mac Software Developer              Montréal, Québec, Canada<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
</div></div><div class="HOEnZb"><div class="h5">&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
</div></div></blockquote></div><br>