Why are you, according to the function definition, returning a pointer to a vtkRenderer object? There is nothing in the body itself that creates a pointer to a renderer (you are returning 0).<br><br>regards,<br><br>Martijn<br>
<br><br><br><div class="gmail_quote">On Wed, Jul 29, 2009 at 4:25 PM, Zampini Samuele <span dir="ltr">&lt;<a href="mailto:samuele.zampini@epfl.ch">samuele.zampini@epfl.ch</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Dear vtk-friends,<br>
<br>
I have a question about vtkDICOMImageReader.<br>
<br>
I read carefully older posts about this argument,<br>
but I can not find the solution.<br>
Could you help???<br>
<br>
This is my code:<br>
<br>
vtkRenderer *create_scene()<br>
{<br>
<br>
  vtkDICOMImageReader *reader = vtkDICOMImageReader::New();<br>
<br>
  //vtkImageViewer2 *viewer = vtkImageViewer2::New();<br>
<br>
  reader-&gt;SetDirectoryName( &quot;/usr/scratch/zampini/vmtk/dicom/pa1/st1/se1/&quot; );<br>
  reader-&gt;Update();<br>
<br>
  vtkStructuredPointsWriter *writer = vtkStructuredPointsWriter::New();<br>
  writer-&gt;SetInput( reader-&gt;GetOutput() );<br>
  writer-&gt;SetFileName( &quot;test.vtk&quot; );<br>
  writer-&gt;Write();<br>
<br>
<br>
<br>
  return 0;<br>
}<br>
<br>
I can compile it (no errors) but when I run it I get a segmentation fault.<br>
<br>
Could you help?<br>
<br>
Thanks a lot,<br>
<br>
samuele.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br>