Problems with vtk3.1

Tian-Qing Ye tianqing.ye at bruker.co.uk
Mon Mar 27 13:26:29 EST 2000


Hi

I have an application which was working with vtk2.4.
Today I have installed the vtk3.1 and recompile my
application. Then it doesn't work correctly anymore!

With vtk2.4 I have vtkStrucuturedPoints as the
input for the vtkImageViewer. With vtk3.1 it doesn't
like the vtkStructuredPoints as input. Ok, I have changed
it (simplly substituted the vtkStructuredPoints by vtkImageData)
to use vtkImageData as the input for vtkImageViewer.
Then I, instead of getting an image, just got a black
viewer!

My scheme is something like the following:

First created a vtkScalars scalars;
Then: 
vtkImageData vol->SetDimensions(img.imgsize, img.imgsize, img.imgsize);
             vol->SetOrigin(0., 0., 0.);
             vol->SetSpacing(1.0, 1.0, 1.0);
             vol->GetPointData()->SetScalars(scalars);
vtkImageViewer viewer->SetInput(vol);
               viewer->SetZSlice(index); 
               vtkActor2D *imgActor = viewer->GetActor2D();
               rend->AddActor2D(imgActor);
               renW->Render();

Anyone can kindly point out why it doesn't work anymore?
As I said, it worked fine with vtk2.4(with StructuredPoints instead of
ImageData)!

Thanks!

T. Ye
--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list