From f7d48d6061d5c8020f0614d19d12c1a9a9126948 Mon Sep 17 00:00:00 2001 From: Leonardo Florez-Valencia Date: Wed, 8 Jun 2016 18:40:42 -0500 Subject: [PATCH] ... --- lib/cpPlugins/ActorPropertiesQtDialog.cxx | 20 ++++++++++++++++++++ lib/cpPlugins/OrthoNormalBase.cxx | 23 +++++++++++++++++++++++ lib/cpPlugins/OrthoNormalBase.hxx | 2 ++ 3 files changed, 45 insertions(+) diff --git a/lib/cpPlugins/ActorPropertiesQtDialog.cxx b/lib/cpPlugins/ActorPropertiesQtDialog.cxx index 394c908..87b41c6 100644 --- a/lib/cpPlugins/ActorPropertiesQtDialog.cxx +++ b/lib/cpPlugins/ActorPropertiesQtDialog.cxx @@ -134,6 +134,26 @@ _configureForAxes( ) title << "Parameters for an object of class \"Axes\""; this->m_Title->setText( title.str( ).c_str( ) ); + /* + vtkAxesActor axes + 178 axes SetShaftTypeToCylinder + 179 axes SetXAxisLabelText "x" + 180 axes SetYAxisLabelText "y" + 181 axes SetZAxisLabelText "z" + 182 axes SetTotalLength 1.5 1.5 1.5 + 183 vtkTextProperty tprop + 184 tprop ItalicOn + 185 tprop ShadowOn + 186 tprop SetFontFamilyToTimes + 187 [ axes GetXAxisCaptionActor2D ] SetCaptionTextProperty tprop + 188 vtkTextProperty tprop2 + 189 tprop2 ShallowCopy tprop + 190 [ axes GetYAxisCaptionActor2D ] SetCaptionTextProperty tprop2 + 191 vtkTextProperty tprop3 + 192 tprop3 ShallowCopy tprop + 193 [ axes GetZAxisCaptionActor2D ] SetCaptionTextProperty tprop3 + */ + return( true ); } diff --git a/lib/cpPlugins/OrthoNormalBase.cxx b/lib/cpPlugins/OrthoNormalBase.cxx index 5d0d9f5..9a02c0b 100644 --- a/lib/cpPlugins/OrthoNormalBase.cxx +++ b/lib/cpPlugins/OrthoNormalBase.cxx @@ -1,6 +1,8 @@ #include +#include #include +#include // ------------------------------------------------------------------------- void cpPlugins::OrthoNormalBase:: @@ -24,7 +26,27 @@ 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 ); } // ------------------------------------------------------------------------- @@ -43,6 +65,7 @@ _CreateVTKActor( ) const { this->m_BaseActor->SetUserMatrix( matrix ); this->m_Actor = this->m_BaseActor.GetPointer( ); + this->m_Actor->Modified( ); } // fi } diff --git a/lib/cpPlugins/OrthoNormalBase.hxx b/lib/cpPlugins/OrthoNormalBase.hxx index e21a3c8..193ff72 100644 --- a/lib/cpPlugins/OrthoNormalBase.hxx +++ b/lib/cpPlugins/OrthoNormalBase.hxx @@ -16,6 +16,7 @@ SetITK( const _TMatrix& m ) if( j < _TMatrix::ColumnDimensions ) matrix->SetElement( i, j, m[ i ][ j ] ); this->m_VTKObject = matrix; + this->_CreateVTKActor( ); } // ------------------------------------------------------------------------- @@ -34,6 +35,7 @@ SetITK( const _TMatrix& m, const _TVector& v ) if( i < _TVector::Dimension ) matrix->SetElement( i, 3, v[ i ] ); this->m_VTKObject = matrix; + this->_CreateVTKActor( ); } #endif // __CPPLUGINS__ORTHONORMALBASE__HXX__ -- 2.45.1