]> Creatis software - cpPlugins.git/blob - lib/cpPlugins/Interface/Mesh.cxx
Major refactoring: API-HCI bug corrected.
[cpPlugins.git] / lib / cpPlugins / Interface / Mesh.cxx
1 #include <cpPlugins/Interface/Mesh.h>
2
3 #include <vtkPolyData.h>
4
5 // -------------------------------------------------------------------------
6 void cpPlugins::Interface::Mesh::
7 SetITKDataObject( itk::DataObject* o )
8 {
9   // TODO: conversion!!!
10   std::cout << "Mesh: SetITKDataObject " << std::endl;
11   std::exit( 1 );
12 }
13
14 // -------------------------------------------------------------------------
15 void cpPlugins::Interface::Mesh::
16 SetVTKDataObject( vtkDataObject* o )
17 {
18   if( dynamic_cast< vtkPolyData* >( o ) != NULL )
19   {
20     this->m_VTKObject = o;
21
22     // TODO: conversion!!!
23   }
24   else
25     this->m_VTKObject = NULL;
26 }
27
28 // -------------------------------------------------------------------------
29 vtkPolyData* cpPlugins::Interface::Mesh::
30 GetVTKPolyData( )
31 {
32   return( dynamic_cast< vtkPolyData* >( this->m_VTKObject.GetPointer( ) ) );
33 }
34
35 // -------------------------------------------------------------------------
36 const vtkPolyData* cpPlugins::Interface::Mesh::
37 GetVTKPolyData( ) const
38 {
39   return(
40     dynamic_cast< const vtkPolyData* >( this->m_VTKObject.GetPointer( ) )
41     );
42 }
43
44 // -------------------------------------------------------------------------
45 cpPlugins::Interface::Mesh::
46 Mesh( )
47   : Superclass( )
48 {
49   this->m_ClassName = "cpPlugins::Interface::Mesh";
50   this->m_ClassCategory = "BasicObject";
51 }
52
53 // -------------------------------------------------------------------------
54 cpPlugins::Interface::Mesh::
55 ~Mesh( )
56 {
57 }
58
59 // -------------------------------------------------------------------------
60 template< unsigned int D >
61 void cpPlugins::Interface::Mesh::
62 _ITK_2_VTK_0( itk::DataObject* o )
63 {
64 }
65
66 // -------------------------------------------------------------------------
67 template< class P, unsigned int D >
68 void cpPlugins::Interface::Mesh::
69 _ITK_2_VTK_1( itk::DataObject* o )
70 {
71 }
72
73 // -------------------------------------------------------------------------
74 template< unsigned int D >
75 void cpPlugins::Interface::Mesh::
76 _VTK_2_ITK_0( itk::DataObject* o )
77 {
78 }
79
80 // -------------------------------------------------------------------------
81 template< class P, unsigned int D >
82 void cpPlugins::Interface::Mesh::
83 _VTK_2_ITK_1( itk::DataObject* o )
84 {
85 }
86
87 // eof - $RCSfile$