delete this->m_UI;
}
+// -------------------------------------------------------------------------
+void cpExtensions::QT::SimpleMPRWidget::
+Clear( )
+{
+ for( unsigned int i = 0; i < 4; ++i )
+ this->m_Renderers[ i ]->RemoveAllViewProps( );
+ for( unsigned int i = 0; i < 3; ++i )
+ {
+ if( this->m_2DSlices[ i ].GetPointer( ) != NULL )
+ this->m_2DSlices[ i ]->Clear( );
+ if( this->m_3DSlices[ i ].GetPointer( ) != NULL )
+ this->m_3DSlices[ i ]->Clear( );
+
+ } // rof
+ this->m_PolyDatas.clear( );
+}
+
// -------------------------------------------------------------------------
void cpExtensions::QT::SimpleMPRWidget::
SetMainImage( vtkImageData* image )
this->m_VTK[ 3 ]->GetRenderWindow( )->Render( );
}
+// -------------------------------------------------------------------------
+void cpExtensions::QT::SimpleMPRWidget::
+AddMesh( vtkPolyData* mesh )
+{
+ PolyDataActor a;
+ a.Configure( mesh );
+ this->m_PolyDatas[ mesh ] = a;
+ this->m_Renderers[ 3 ]->AddViewProp( a.Actor );
+
+ bool has_main_image = false;
+ for( unsigned int i = 0; i < 3; ++i )
+ {
+ if( this->m_2DSlices[ i ].GetPointer( ) != NULL )
+ {
+ if( this->m_2DSlices[ i ]->GetInputData( ) != NULL )
+ {
+ has_main_image = true;
+ this->m_2DSlices[ i ]->AddMesh( mesh );
+ this->m_2DSlices[ i ]->Render( );
+
+ } // fi
+
+ } // fi
+
+ } // rof
+ if( !has_main_image )
+ this->m_Renderers[ 3 ]->ResetCamera( );
+ this->m_VTK[ 3 ]->GetRenderWindow( )->Render( );
+}
+
// -------------------------------------------------------------------------
void cpExtensions::QT::SimpleMPRWidget::
_SyncBottom( int a, int b )