[vtkusers] texture mapping

Gisele Douta gdouta at MEMcenter.unibe.ch
Fri Dec 5 02:49:20 EST 2003


I deseperatly need some help on this problem ......

I have a class which contain the following pipeline 


					  vtkWindowLevelLookupTable
					  		  |
			 				  |
		    vtkImageReslice--vtkImageResample--vtkTexture	
					  		  |
			 				  |
vtkPlaneSource--vtkTextureMapToPlane--vtkDataSetMapper--vtkActor 


then I create three of this objects and I display them using the vtkQtRenderWindow 
implemented by Matthias Koenig

vtkRenderer *renderer[3];
vtkQtRenderWindow* views[3];
myClass* test[3]
	
QWidget	*mainwidget = new QWidget;
QGridLayout *layout = new QGridLayout( mainwidget, 2, 2, 10);

for ( int i=0; i<3; i++ )
{
	views[i] = new vtkQtRenderWindow( mainwidget );
	renderer[i] =  vtkRenderer::New();	
	renderer[i]->AddActor( test[i]->getVtkActor() );
	views[i]->AddRenderer( renderer[i] );
}
	
layout->addWidget( views[0], 0, 0 );
layout->addWidget( views[1], 0, 1 );	
layout->addWidget( views[2], 1, 0 );
	

My problem is that the first rendering look perfect but if for whatever resason the display 
has to be updated then the three actor will be display with the texture of the last created 
object. Can someone help me with this problem ?

Gisele

--------------------------------------------------
Gisèle Douta
PhD student - Planning and Navigation (PN)
M.E Müller Research Center for Orthopaedic Surgery
Institute for Surgical Technology and Biomechanics
University of Bern
Murtenstr. 35,  P.O. Box 8354
CH-3001 Bern, Switzerland
Tel:   +41 31 632 4970
Fax:   +41 31 632 4951
Email: Gisele.Douta at MEMcenter.unibe.ch
http://www.MEMcenter.unibe.ch
--------------------------------------------------





More information about the vtkusers mailing list