[vtkusers] vtkDICOMImageReader

Martijn de Greef m.d.greef at gmail.com
Wed Jul 29 10:52:24 EDT 2009


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).

regards,

Martijn



On Wed, Jul 29, 2009 at 4:25 PM, Zampini Samuele <samuele.zampini at epfl.ch>wrote:

> Dear vtk-friends,
>
> I have a question about vtkDICOMImageReader.
>
> I read carefully older posts about this argument,
> but I can not find the solution.
> Could you help???
>
> This is my code:
>
> vtkRenderer *create_scene()
> {
>
>  vtkDICOMImageReader *reader = vtkDICOMImageReader::New();
>
>  //vtkImageViewer2 *viewer = vtkImageViewer2::New();
>
>  reader->SetDirectoryName( "/usr/scratch/zampini/vmtk/dicom/pa1/st1/se1/"
> );
>  reader->Update();
>
>  vtkStructuredPointsWriter *writer = vtkStructuredPointsWriter::New();
>  writer->SetInput( reader->GetOutput() );
>  writer->SetFileName( "test.vtk" );
>  writer->Write();
>
>
>
>  return 0;
> }
>
> I can compile it (no errors) but when I run it I get a segmentation fault.
>
> Could you help?
>
> Thanks a lot,
>
> samuele.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090729/14aedaa1/attachment.htm>


More information about the vtkusers mailing list