--- /dev/null
+#include <Extensions/Skeleton.h>
+#include <cpExtensions/Visualization/SkeletonToPolyData.h>
+#include <cpExtensions/DataStructures/Skeleton.h>
+
+// -------------------------------------------------------------------------
+void cpPluginsExtensions::Skeleton::
+SetITK( itk::LightObject* o )
+{
+ cpPlugins_Demangle_Skeleton_All_1( o, _ITK_2_VTK )
+ {
+ this->m_VTK = NULL;
+ this->m_ITKvVTK = NULL;
+ }
+}
+
+// -------------------------------------------------------------------------
+void cpPluginsExtensions::Skeleton::
+SetVTK( vtkObjectBase* o )
+{
+ // Do nothing
+ this->m_ITK = NULL;
+ this->m_VTK = NULL;
+ this->m_ITKvVTK = NULL;
+}
+
+// -------------------------------------------------------------------------
+cpPluginsExtensions::Skeleton::
+Skeleton( )
+ : Superclass( )
+{
+}
+
+// -------------------------------------------------------------------------
+cpPluginsExtensions::Skeleton::
+~Skeleton( )
+{
+}
+
+// -------------------------------------------------------------------------
+template< class _TSkeleton >
+void cpPluginsExtensions::Skeleton::
+_ITK_2_VTK( _TSkeleton* sk )
+{
+ typedef
+ cpExtensions::Visualization::SkeletonToPolyData< _TSkeleton >
+ _TFilter;
+ _TFilter* f = dynamic_cast< _TFilter* >( this->m_ITKvVTK.GetPointer( ) );
+ if( f == NULL )
+ {
+ _TFilter* nf = _TFilter::New( );
+ this->m_ITKvVTK = nf;
+ f = nf;
+
+ } // fi
+ f->SetInput( sk );
+ f->Update( );
+
+ // Keep object track
+ this->m_ITK = sk;
+ this->m_VTK = f->GetOutput( );
+}
+
+// eof - $RCSfile$