[vtkusers] vtkQt Volume Rendering

Lisa Avila lisa.avila at kitware.com
Tue Jun 21 15:34:25 EDT 2005


Hi Matt,

Are you using the SAME vtkVolume in two different vtkRenderer? This is not 
currently supported (due to OpenGL resource issues - not shared between 
contexts) You have to create two different volumes and mappers for use in 
the two renderers.

Lisa


At 03:16 PM 6/21/2005, Matthew Seier wrote:
>Dear Users,
>
>I am using the vtkQt classes by Matthias Koenig to do a ray cast volume 
>rendering using .vol files as input to vtkImageImport.  I am displaying 
>one volume in each of 2 vtkQtRenderWindows inside a Qt Widget.  However, 
>whenever I call the Render() function using the Renderer or Interactor 
>nothing renders, and when I call it using the vtkQtRenderWindow, the 
>program crashes with a Segmentation fault.  I am using a tested vtk 
>pipeline, so I am fairly certain that is not the problem.  I should also 
>add that I am using SUSE Linux.  Does anyone know how to solve this dilemma?
>
>Here is some of my code to import one of the volumes:
>//file 1 is a string containing a filename
>ifstream f1;
>f1.open(file1,ios::binary);
>volume1 = new unsigned short int [bytesize/2];
>f1.read((char*)vol1,bytesize);
>if(!f1)
>    cout << "File not Found"<<endl;
>f1.close();
>
>imgdata1=vtkImageImport::New();
>imgdata1->SetImportVoidPointer(vol1);
>imgdata1->SetWholeExtent(0,extent1[0]-1,0,extent1[1]-1,0,extent1[2]-1);
>  imgdata1->SetDataExtentToWholeExtent();
>imgdata1->SetDataScalarTypeToUnsignedShort();
>imgdata1->SetNumberOfScalarComponents(1);
>imgdata1->Modified();
>imgdata1->Update();
>
>Thanks for your help,
>Matt
>
>
>_______________________________________________
>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