]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/OrthoNormalBase.cxx
...
[cpPlugins.git] / lib / cpPlugins / OrthoNormalBase.cxx
1 #include <cpPlugins/OrthoNormalBase.h>
2
3 #include <vtkMatrix4x4.h>
4
5 // -------------------------------------------------------------------------
6 void cpPlugins::OrthoNormalBase::
7 SetITK( itk::LightObject* o )
8 {
9   // WARNING: Do nothing since itk::Matrix does not belong to the
10   // itk::LightObject hierarchy.
11 }
12
13 // -------------------------------------------------------------------------
14 void cpPlugins::OrthoNormalBase::
15 SetVTK( vtkObjectBase* o )
16 {
17   auto matrix = dynamic_cast< vtkMatrix4x4* >( o );
18   if( matrix !=  NULL )
19     this->Superclass::SetVTK( matrix );
20 }
21
22 // -------------------------------------------------------------------------
23 cpPlugins::OrthoNormalBase::
24 OrthoNormalBase( )
25   : Superclass( )
26 {
27   this->m_BaseActor = vtkSmartPointer< vtkAxesActor >::New( );
28 }
29
30 // -------------------------------------------------------------------------
31 cpPlugins::OrthoNormalBase::
32 ~OrthoNormalBase( )
33 {
34 }
35
36 // -------------------------------------------------------------------------
37 void cpPlugins::OrthoNormalBase::
38 _CreateVTKActor( ) const
39 {
40   auto matrix =
41     const_cast< vtkMatrix4x4* >( this->GetVTK< vtkMatrix4x4 >( ) );
42   if( matrix != NULL )
43   {
44     this->m_BaseActor->SetUserMatrix( matrix );
45     this->m_Actor = this->m_BaseActor.GetPointer( );
46
47   } // fi
48 }
49
50 // eof - $RCSfile$