#include <vtkPoints.h>
#include <vtkPolyData.h>
-// -------------------------------------------------------------------------
-#define cpPlugins_Mesh_Import( N, T, D ) \
- cpPlugins_TEMPLATE_IMPORT( \
- 2(class cpPlugins_Interface_EXPORT itk::N< T, D >) \
- )
-
-// -------------------------------------------------------------------------
-
-#ifndef cpPlugins_Interface_EXPORTS
-
-cpPlugins_Mesh_Import( Mesh, float, 2 );
-cpPlugins_Mesh_Import( Mesh, double, 2 );
-cpPlugins_Mesh_Import( Mesh, float, 3 );
-cpPlugins_Mesh_Import( Mesh, double, 3 );
-cpPlugins_Mesh_Import( QuadEdgeMesh, float, 2 );
-cpPlugins_Mesh_Import( QuadEdgeMesh, double, 2 );
-cpPlugins_Mesh_Import( QuadEdgeMesh, float, 3 );
-cpPlugins_Mesh_Import( QuadEdgeMesh, double, 3 );
-
-#endif // cpPlugins_Interface_EXPORTS
-
// -------------------------------------------------------------------------
template< class M >
void cpPlugins::Interface::Mesh::
-SetITK( M* mesh )
+_ITK_2_VTK( itk::LightObject* o )
{
- if( this->m_ITKObject.GetPointer( ) == mesh )
+ M* mesh = dynamic_cast< M* >( o );
+ if( mesh == NULL )
return;
- this->m_ITKObject = mesh;
-
long numPoints = mesh->GetNumberOfPoints( );
if( numPoints == 0 )
return;
this->Modified( );
}
+// -------------------------------------------------------------------------
+#define cpPlugins_Mesh_Import( N, T, D ) \
+ cpPlugins_TEMPLATE_IMPORT( \
+ 2(class cpPlugins_Interface_EXPORT itk::N< T, D >) \
+ )
+
+// -------------------------------------------------------------------------
+
+#ifndef cpPlugins_Interface_EXPORTS
+
+cpPlugins_Mesh_Import( Mesh, float, 2 );
+cpPlugins_Mesh_Import( Mesh, double, 2 );
+cpPlugins_Mesh_Import( Mesh, float, 3 );
+cpPlugins_Mesh_Import( Mesh, double, 3 );
+cpPlugins_Mesh_Import( QuadEdgeMesh, float, 2 );
+cpPlugins_Mesh_Import( QuadEdgeMesh, double, 2 );
+cpPlugins_Mesh_Import( QuadEdgeMesh, float, 3 );
+cpPlugins_Mesh_Import( QuadEdgeMesh, double, 3 );
+
+#endif // cpPlugins_Interface_EXPORTS
+
#endif // __CPPLUGINS__INTERFACE__MESH__HXX__
// eof - $RCSfile$