[vtkusers] Help vtkPNMReader

Amy Henderson amy.henderson at kitware.com
Fri Dec 10 08:35:03 EST 2004


In this case, Update will be called when by renWin->Render().  You don't 
need to call it directly.  It should only be called directly if you are 
trying to access information from the output of a reader, filter, etc. 
before Update would have been called by the pipeline (the Render call in 
the example code provided).

I noticed that you did not set up a vtkVolumeProperty with its associated 
color and opacity transfer functions.  Take a look at 
VTK/Examples/VolumeRendering/Tcl/SimpleRayCast.tcl to see how this is done.

- Amy

At 11:48 PM 12/9/2004, tom fogal wrote:
>  <20041210044019.61A541CE304 at ws1-6.us4.outblaze.com>"Anderson Cordeiro" 
> writes:
> >This is my first try with volume rendering in VTK. I have 188 ppm files 
> and wa
> >nt to use them to view a volume. The following code works, but shows 
> only a bl
> >ack box. What is wrong/missing?
> >
><snip>
> >        vtkPNMReader *pnm = vtkPNMReader::New();
> >        pnm->SetDataExtent(0,103,0,127,0,188);
> >        pnm->SetFilePrefix("..\\PPM-Imgs\\a_vm1001-m.ppm");
> >
> >// volume stuff
><snip>
> >        volumeMapper->SetInput(pnm->GetOutput());
>
>Try a 'pnm->Update()' call before you try to get the output.
>
>Just an idea... good luck.
>
>-tom
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
>http://www.vtk.org/Wiki/VTK_FAQ
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers






More information about the vtkusers mailing list