[vtkusers] (no subject)
    Gisele Douta 
    gdouta at MEMcenter.unibe.ch
       
    Thu Dec  4 10:39:15 EST 2003
    
    
  
I have a class wich contain the following visualization pipeline
vtkImageReslice *reslice = vtkImageReslice::New();
  reslice->SetInput(  myData );
vtkImageResample *resample = vtkImageResample::New();
  resample->SetInput(reslice->GetOutput());
    	
vtkWindowLevelLookupTable *lookupTable = vtkWindowLevelLookupTable::New();
vtkPlaneSource *planeSource = vtkPlaneSource::New();
		
vtkTextureMapToPlane *textureCoords = vtkTextureMapToPlane::New();
  textureCoords->SetInput( (vtkDataSet *)planeSource->GetOutput() );
  		  
vtkDataSetMapper *mapper =  vtkDataSetMapper::New();
  mapper->SetInput( textureCoords->GetOutput());
vtkTexture *texture = vtkTexture::New();
  texture->SetInput( resample->GetOutput());
vtkActor *actor = vtkActor::New();
  actor->SetTexture( texture );
  actor->SetMapper( mapper );
then I create three of this objects and I display them using the vtkQtRenderWindow 
implemented by Matthias Koenig  
....
QApplication app( argc, argv );
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 );
app.setMainWidget( mainwidget );
	
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
    
    
More information about the vtkusers
mailing list