]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/OrthoNormalBase.cxx
...
[cpPlugins.git] / lib / cpPlugins / OrthoNormalBase.cxx
index 9bbb18b585256cb6bc938d45cdbb14ce265e75e2..5d0d9f58562b71b65abdf9700e582638190c07d4 100644 (file)
@@ -6,7 +6,8 @@
 void cpPlugins::OrthoNormalBase::
 SetITK( itk::LightObject* o )
 {
-  // Do nothing since itk::Matrix does not belong to LightObject hierarchy.
+  // WARNING: Do nothing since itk::Matrix does not belong to the
+  // itk::LightObject hierarchy.
 }
 
 // -------------------------------------------------------------------------
@@ -23,6 +24,7 @@ cpPlugins::OrthoNormalBase::
 OrthoNormalBase( )
   : Superclass( )
 {
+  this->m_BaseActor = vtkSmartPointer< vtkAxesActor >::New( );
 }
 
 // -------------------------------------------------------------------------
@@ -39,54 +41,8 @@ _CreateVTKActor( ) const
     const_cast< vtkMatrix4x4* >( this->GetVTK< vtkMatrix4x4 >( ) );
   if( matrix != NULL )
   {
-    this->m_BaseActor.SetBase( matrix );
-    this->m_Actor = this->m_BaseActor.Actor.GetPointer( );
-    /* TODO
-       double o[ 3 ], x[ 3 ], y[ 3 ], z[ 3 ];
-
-       o[ 0 ] = matrix->GetElement( 0, 3 );
-       o[ 1 ] = matrix->GetElement( 1, 3 );
-       o[ 2 ] = matrix->GetElement( 2, 3 );
-
-       x[ 0 ] = matrix->GetElement( 0, 0 ) + o[ 0 ];
-       x[ 1 ] = matrix->GetElement( 1, 0 ) + o[ 1 ];
-       x[ 2 ] = matrix->GetElement( 2, 0 ) + o[ 2 ];
-
-       y[ 0 ] = matrix->GetElement( 0, 1 ) + o[ 0 ];
-       y[ 1 ] = matrix->GetElement( 1, 1 ) + o[ 1 ];
-       y[ 2 ] = matrix->GetElement( 2, 1 ) + o[ 2 ];
-
-       z[ 0 ] = matrix->GetElement( 0, 2 ) + o[ 0 ];
-       z[ 1 ] = matrix->GetElement( 1, 2 ) + o[ 1 ];
-       z[ 2 ] = matrix->GetElement( 2, 2 ) + o[ 2 ];
-
-       static vtkPoints* points = vtkPoints::New( );
-       points->InsertNextPoint( o );
-       points->InsertNextPoint( x );
-       points->InsertNextPoint( y );
-       points->InsertNextPoint( z );
-
-       static vtkCellArray* lines = vtkCellArray::New( );
-       lines->InsertNextCell( 2 ); lines->InsertCellPoint( 0 ); lines->InsertCellPoint( 1 );
-       lines->InsertNextCell( 2 ); lines->InsertCellPoint( 0 ); lines->InsertCellPoint( 2 );
-       lines->InsertNextCell( 2 ); lines->InsertCellPoint( 0 ); lines->InsertCellPoint( 3 );
-
-       static vtkPolyData* base = vtkPolyData::New( );
-       base->SetPoints( points );
-       base->SetLines( lines );
-
-       static vtkPolyDataMapper* mapper = vtkPolyDataMapper::New( );
-       mapper->SetInputData( base );
-
-       static vtkActor* actor = vtkActor::New( );
-       actor->SetMapper( mapper );
-       this->m_Actor = actor;
-    */
-    /*
-      this->m_AxesActor = vtkSmartPointer< vtkAxesActor >::New( );
-      this->m_AxesActor->SetUserMatrix( matrix );
-      this->m_Actor = this->m_AxesActor.GetPointer( );
-    */
+    this->m_BaseActor->SetUserMatrix( matrix );
+    this->m_Actor = this->m_BaseActor.GetPointer( );
 
   } // fi
 }