} // rof
if( wren != NULL )
wren->AddActor( this->ImageOutlineActor );
+
+ for( unsigned int j = 0; j < 3; ++j )
+ {
+ ImageInteractorStyle* st =
+ dynamic_cast< ImageInteractorStyle* >( this->Slices[ 0 ][ j ]->GetStyle( ) );
+ if( w != NULL )
+ st->AssociateInteractor( w->GetInteractor( ) );
+ for( unsigned int l = 0; l < 3; ++l )
+ if( j != l )
+ st->AssociateInteractor(
+ this->Slices[ 0 ][ l ]->GetStyle( )->GetInteractor( )
+ );
+
+ } // rof
}
// -------------------------------------------------------------------------
for( unsigned int i = 0; i < 2; ++i )
for( unsigned int j = 0; j < 3; ++j )
this->Slices[ i ][ j ] = vtkSmartPointer< ImageSliceActors >::New( );
+
+ this->Slices[ 0 ][ 0 ]->AssociateSlice( this->Slices[ 1 ][ 0 ] );
+ this->Slices[ 0 ][ 1 ]->AssociateSlice( this->Slices[ 1 ][ 1 ] );
+ this->Slices[ 0 ][ 2 ]->AssociateSlice( this->Slices[ 1 ][ 2 ] );
+
+ this->Slices[ 0 ][ 0 ]->SetSlicesCommand( Self::_SetSlices, this );
+ this->Slices[ 0 ][ 1 ]->SetSlicesCommand( Self::_SetSlices, this );
+ this->Slices[ 0 ][ 2 ]->SetSlicesCommand( Self::_SetSlices, this );
}
// -------------------------------------------------------------------------
*/
}
+// -------------------------------------------------------------------------
+void cpExtensions::Visualization::MPRActors::
+_SetSlices( double* pos, int axis, void* data )
+{
+ MPRActors* actors = reinterpret_cast< MPRActors* >( data );
+ if( actors == NULL )
+ return;
+ for( unsigned int j = 0; j < 3; ++j )
+ if( actors->Slices[ 0 ][ j ]->GetAxis( ) != axis )
+ actors->Slices[ 0 ][ j ]->SetSlice( pos );
+ actors->Modified( );
+}
+
// eof - $RCSfile$