+// -------------------------------------------------------------------------
+void cpExtensions::Visualization::ImageSliceActors::
+Clear( )
+{
+ // 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 ] );
+ else
+ return( NULL );
+}
+
+// -------------------------------------------------------------------------
+const vtkImageActor* cpExtensions::Visualization::ImageSliceActors::
+GetImageActor( unsigned int id ) const
+{
+ if( id < this->ImageActors.size( ) )
+ return( this->ImageActors[ id ] );
+ else
+ return( NULL );
+}
+
+// -------------------------------------------------------------------------
+vtkTextActor* cpExtensions::Visualization::ImageSliceActors::
+GetTextActor( )
+{
+ return( this->TextActor );
+}
+
+// -------------------------------------------------------------------------
+const vtkTextActor* cpExtensions::Visualization::ImageSliceActors::
+GetTextActor( ) const
+{
+ return( this->TextActor );
+}
+
+// -------------------------------------------------------------------------
+vtkActor* cpExtensions::Visualization::ImageSliceActors::
+GetPlaneActor( )
+{
+ return( this->PlaneActor );
+}
+
+// -------------------------------------------------------------------------
+const vtkActor* cpExtensions::Visualization::ImageSliceActors::
+GetPlaneActor( ) const
+{
+ return( this->PlaneActor );
+}
+