]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/OrthoNormalBase.cxx
...
[cpPlugins.git] / lib / cpPlugins / OrthoNormalBase.cxx
1 #include <cpPlugins/OrthoNormalBase.h>
2
3 #include <vtkAxesActor.h>
4 #include <vtkMatrix4x4.h>
5
6 // -------------------------------------------------------------------------
7 void cpPlugins::OrthoNormalBase::
8 SetITK( itk::LightObject* o )
9 {
10   // Do nothing since itk::Matrix does not belong to 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 }
28
29 // -------------------------------------------------------------------------
30 cpPlugins::OrthoNormalBase::
31 ~OrthoNormalBase( )
32 {
33 }
34
35 // -------------------------------------------------------------------------
36 void cpPlugins::OrthoNormalBase::
37 _CreateVTKActor( ) const
38 {
39   auto matrix =
40     const_cast< vtkMatrix4x4* >( this->GetVTK< vtkMatrix4x4 >( ) );
41   if( matrix !=  NULL )
42   {
43     auto actor = vtkAxesActor::New( );
44     actor->SetUserMatrix( matrix );
45     this->m_Actor = actor;
46
47   } // fi
48 }
49
50 // eof - $RCSfile$