#include #include #include #include #include #include // ------------------------------------------------------------------------- cpExtensions::Visualization::ImageSliceMapper:: Self* cpExtensions::Visualization::ImageSliceMapper:: New( ) { return( new Self( ) ); } // ------------------------------------------------------------------------- cpExtensions::Visualization::ImageSliceMapper:: ImageSliceMapper( ) : Superclass( ) { #ifdef cpPlugins_OpenGL_BackEnd_OpenGL2 // Complete polydatas to avoid bizarre rendering errors (multi-thread) vtkActor* a[ 3 ]; a[ 0 ] = this->PolyDataActor; a[ 1 ] = this->BackingPolyDataActor; a[ 2 ] = this->BackgroundPolyDataActor; for( unsigned int i = 0; i < 3; ++i ) { if( a[ i ] != NULL ) { auto m = dynamic_cast< vtkOpenGLPolyDataMapper* >( a[ i ]->GetMapper( ) ); if( m != NULL ) { auto p = m->GetInput( ); if( p != NULL ) { vtkNew< vtkCellArray > verts; vtkNew< vtkCellArray > lines; vtkNew< vtkCellArray > strips; p->SetVerts( verts.Get( ) ); p->SetLines( lines.Get( ) ); p->SetStrips( strips.Get( ) ); p->Modified( ); m->Modified( ); a[ i ]->Modified( ); } // fi } // fi } // fi } // rof #endif // cpPlugins_OpenGL_BackEnd_OpenGL2 } // ------------------------------------------------------------------------- cpExtensions::Visualization::ImageSliceMapper:: ~ImageSliceMapper( ) { } // eof - $RCSfile$