+int cpExtensions::Interaction::ImageSliceStyle::
+GetSliceNumber( ) const
+{
+ if( this->m_WLActor.GetPointer( ) != NULL )
+ return( this->m_WLActor->GetSliceNumber( ) );
+ else
+ return( -1 );
+}
+
+// -------------------------------------------------------------------------
+int cpExtensions::Interaction::ImageSliceStyle::
+GetOrientation( ) const
+{
+ if( this->m_WLActor.GetPointer( ) != NULL )
+ return( this->m_WLActor->GetOrientation( ) );
+ else
+ return( -1 );
+}
+
+// -------------------------------------------------------------------------
+void cpExtensions::Interaction::ImageSliceStyle::
+OnMouseMove( )
+{
+ static bool cursor_visible = false;
+
+ int idx[ 2 ];
+ double pnt[ 3 ];
+ if( this->_PickPointOnImageActor( idx, pnt ) )
+ {
+ this->m_Cursor->SetCursor( pnt, false );
+ this->_ShowText( pnt );
+ if( !cursor_visible )
+ {
+ this->m_Cursor->VisibilityOn( );
+ this->m_Text->VisibilityOn( );
+ cursor_visible = true;
+
+ } // fi
+ this->Interactor->Render( );
+ }
+ else
+ {
+ if( cursor_visible )
+ {
+ this->m_Cursor->VisibilityOff( );
+ this->m_Text->VisibilityOff( );
+ cursor_visible = false;
+ this->Interactor->Render( );
+
+ } // fi
+
+ } // fi
+
+ this->Overclass::OnMouseMove( );
+}
+
+// -------------------------------------------------------------------------
+void cpExtensions::Interaction::ImageSliceStyle::
+OnMouseWheelForward( )
+{
+ static int s = 0;
+ if( this->m_WLActor.GetPointer( ) == NULL )
+ return;
+ s = this->m_WLActor->GetSliceNumber( );
+ s += ( this->Interactor->GetShiftKey( ) == 1 )? 10: 1;
+ this->m_WLActor->SetSliceNumber( s );
+ s = this->m_WLActor->GetSliceNumber( );
+ if( this->m_LUTActor.GetPointer( ) != NULL )
+ this->m_LUTActor->SetSliceNumber( s );
+ this->InvokeEvent( vtkCommand::UserEvent + 2, &s );
+ this->Interactor->Render( );
+ this->OnMouseMove( );
+}
+
+// -------------------------------------------------------------------------
+void cpExtensions::Interaction::ImageSliceStyle::
+OnMouseWheelBackward( )
+{
+ static int s = 0;
+ if( this->m_WLActor.GetPointer( ) == NULL )
+ return;
+ s = this->m_WLActor->GetSliceNumber( );
+ s -= ( this->Interactor->GetShiftKey( ) == 1 )? 10: 1;
+ this->m_WLActor->SetSliceNumber( s );
+ s = this->m_WLActor->GetSliceNumber( );
+ if( this->m_LUTActor.GetPointer( ) != NULL )
+ this->m_LUTActor->SetSliceNumber( s );
+ this->InvokeEvent( vtkCommand::UserEvent + 2, &s );
+ this->Interactor->Render( );
+ this->OnMouseMove( );
+}
+
+// -------------------------------------------------------------------------
+void cpExtensions::Interaction::ImageSliceStyle::
+OnChar( )
+{
+ switch( this->Interactor->GetKeyCode( ) )
+ {
+ case 'r': case 'R':
+ {
+ this->FindPokedRenderer(
+ this->Interactor->GetEventPosition( )[ 0 ],
+ this->Interactor->GetEventPosition( )[ 1 ]
+ );
+ this->CurrentRenderer->ResetCamera( );
+ this->Interactor->Render( );
+ }
+ break;
+ default:
+ break;
+
+ } // hctiws
+}
+
+/* TODO