#include #include #include #include // ------------------------------------------------------------------------- void cpPlugins::OrthoNormalBase:: SetITK( itk::LightObject* o ) { // WARNING: Do nothing since itk::Matrix does not belong to the // itk::LightObject hierarchy. } // ------------------------------------------------------------------------- void cpPlugins::OrthoNormalBase:: SetVTK( vtkObjectBase* o ) { auto matrix = dynamic_cast< vtkMatrix4x4* >( o ); if( matrix != NULL ) this->Superclass::SetVTK( matrix ); } // ------------------------------------------------------------------------- cpPlugins::OrthoNormalBase:: OrthoNormalBase( ) : Superclass( ) { vtkSmartPointer< vtkTextProperty > t1, t2, t3; t1 = vtkSmartPointer< vtkTextProperty >::New( ); t2 = vtkSmartPointer< vtkTextProperty >::New( ); t3 = vtkSmartPointer< vtkTextProperty >::New( ); t1->ItalicOff( ); t1->ShadowOff( ); t1->SetFontFamilyToTimes( ); t2->ShallowCopy( t1 ); t3->ShallowCopy( t1 ); this->m_BaseActor = vtkSmartPointer< vtkAxesActor >::New( ); this->m_BaseActor->GetXAxisCaptionActor2D( )->SetCaptionTextProperty( t1 ); this->m_BaseActor->GetYAxisCaptionActor2D( )->SetCaptionTextProperty( t2 ); this->m_BaseActor->GetZAxisCaptionActor2D( )->SetCaptionTextProperty( t3 ); this->m_BaseActor->SetShaftTypeToLine( ); this->m_BaseActor->SetXAxisLabelText( "x" ); this->m_BaseActor->SetYAxisLabelText( "y" ); this->m_BaseActor->SetZAxisLabelText( "z" ); this->m_BaseActor->SetTotalLength( 1.0, 1.0, 1.0 ); } // ------------------------------------------------------------------------- cpPlugins::OrthoNormalBase:: ~OrthoNormalBase( ) { } // ------------------------------------------------------------------------- void cpPlugins::OrthoNormalBase:: _CreateVTKActor( ) const { auto matrix = const_cast< vtkMatrix4x4* >( this->GetVTK< vtkMatrix4x4 >( ) ); if( matrix != NULL ) { this->m_BaseActor->SetUserMatrix( matrix ); this->m_Actor = this->m_BaseActor.GetPointer( ); this->m_Actor->Modified( ); } // fi } // eof - $RCSfile$