void cpExtensions::Visualization::ImageSliceActors::
AddActor( vtkAlgorithm* algorithm, vtkActor* actor )
{
- this->OtherActors.push_back( std::pair< vtkSmartPointer< vtkAlgorithm >, vtkSmartPointer< vtkActor > >( algorithm, actor ) );
+ this->OtherActors.push_back( TActorPair( algorithm, actor ) );
this->AddItem( actor );
}
+// -------------------------------------------------------------------------
+void cpExtensions::Visualization::ImageSliceActors::
+AddActor( vtkActor* actor )
+{
+ this->AddActor( NULL, actor );
+}
+
// -------------------------------------------------------------------------
void cpExtensions::Visualization::ImageSliceActors::
SetInterpolate( bool v )
// Prepare other actors to update
for( unsigned int i = 0; i < this->OtherActors.size( ); ++i )
{
-#error CLEAN UP CODING STYLE AND NULL POINTER CHECK
+ if( this->OtherActors[ i ].first.GetPointer( ) != NULL )
+ {
+ this->OtherActors[ i ].first->Modified( );
+ this->OtherActors[ i ].first->Update( );
+
+ } // fi
+
+ if( this->OtherActors[ i ].second.GetPointer( ) != NULL )
+ {
+ this->OtherActors[ i ].second->GetMapper( )->Modified( );
+ this->OtherActors[ i ].second->Modified( );
- this->OtherActors[ i ].first->Modified( );
- this->OtherActors[ i ].first->Update( );
- this->OtherActors[ i ].second->GetMapper( )->Modified( );
- this->OtherActors[ i ].second->Modified( );
+ } // fi
} // rof