- // Unbind from container
- this->RemoveAllItems( );
-
- // Delete all images
- this->SliceMappers.clear( );
- this->ImageActors.clear( );
-
- // Reconfigure unique objects
- this->PlaneSource = vtkSmartPointer< vtkPolyData >::New( );
- this->PlaneMapper = vtkSmartPointer< vtkPolyDataMapper >::New( );
- this->TextActor = vtkSmartPointer< vtkTextActor >::New( );
- this->PlaneActor = vtkSmartPointer< vtkActor >::New( );
- this->TextBuffer[ 0 ] = '\0';
-
- // Unique objects configuration
- vtkSmartPointer< vtkPoints > plane_points =
- vtkSmartPointer< vtkPoints >::New( );
- vtkSmartPointer< vtkCellArray > plane_lines =
- vtkSmartPointer< vtkCellArray >::New( );
-
- plane_points->InsertNextPoint( 0, 0, 0 );
- plane_points->InsertNextPoint( 0, 1, 0 );
- plane_points->InsertNextPoint( 1, 1, 0 );
- plane_points->InsertNextPoint( 1, 0, 0 );
- plane_lines->InsertNextCell( 5 );
- plane_lines->InsertCellPoint( 0 );
- plane_lines->InsertCellPoint( 1 );
- plane_lines->InsertCellPoint( 2 );
- plane_lines->InsertCellPoint( 3 );
- plane_lines->InsertCellPoint( 0 );
- this->PlaneSource->SetPoints( plane_points );
- this->PlaneSource->SetLines( plane_lines );
-
- this->PlaneMapper->SetInputData( this->PlaneSource );
- this->PlaneActor->SetMapper( this->PlaneMapper );
-
- this->TextActor->SetTextScaleModeToNone( );
- vtkTextProperty* textprop = this->TextActor->GetTextProperty( );
- textprop->SetColor( 1, 1, 1 );
- textprop->SetFontFamilyToCourier( );
- textprop->SetFontSize( 18 );
- textprop->BoldOff( );
- textprop->ItalicOff( );
- textprop->ShadowOff( );
- textprop->SetJustificationToLeft( );
- textprop->SetVerticalJustificationToBottom( );
- vtkCoordinate* coord = this->TextActor->GetPositionCoordinate( );
- coord->SetCoordinateSystemToNormalizedViewport( );
- coord->SetValue( 0.01, 0.01 );
-}
-
-// -------------------------------------------------------------------------
-unsigned int cpExtensions::Visualization::ImageSliceActors::
-GetNumberOfImageActors( ) const
-{
- return( this->ImageActors.size( ) );
-}
-
-// -------------------------------------------------------------------------
-vtkImageActor* cpExtensions::Visualization::ImageSliceActors::
-GetImageActor( unsigned int id )
-{
- if( id < this->ImageActors.size( ) )
- return( this->ImageActors[ id ] );