[vtkusers] Please help

Bill Lorensen wlorens1 at nycap.rr.com
Thu Jun 8 19:39:23 EDT 2000


Ahmed,
You need to apply an Update to your ImageToStructuredPoints:
toStructuredPoints->SetInput(reader->GetOutput())
toStructuredPoints->Update()

In your first example, the GetImage(1) forces a read. But the second example has nothing to force the read.

Bill


At 07:31 PM 6/8/00 +0300, AHMED MAHMOUD wrote:
>Hello ,
>I have 16 bit image I used this pipeline to access the pixels values
>vtkVolume16Reader reader
>vtkStructuredPoints sp
>sp=reader->GetImage (1)
>vtkScalars scalar
>scalar = sp->GetPointData()->GetScalars()
>and it works,
>but when I used the same pipeline to read bmp data the scalar  pointer was
>Null why ?? here is my code
>///////////////////
>vtkBMPReader reader
>vtkImageToStructuredPoints  toStructuredPoints
>toStructuredPoints->SetInput(reader->GetOutput())
>vtkStructuredPoints sp
>sp=toStructuredPoints->GetOutput()
>vtkScalars scalar
>scalar = sp->GetPointData()->GetScalars();
>////////////
>Why scalar is Null ??
>Thank you very much
>
>
>
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>vtkusers mailing list
>vtkusers at public.kitware.com
>http://public.kitware.com/mailman/listinfo/vtkusers 






More information about the vtkusers mailing list