]> Creatis software - cpPlugins.git/commitdiff
...
authorLeonardo Flórez-Valencia <leonardo.florez@gmail.com>
Tue, 21 Feb 2017 03:01:39 +0000 (22:01 -0500)
committerLeonardo Flórez-Valencia <leonardo.florez@gmail.com>
Tue, 21 Feb 2017 03:01:39 +0000 (22:01 -0500)
plugins/cpExtensions/PolyLineParametricPathToPolyData.cxx [new file with mode: 0644]
plugins/cpExtensions/PolyLineParametricPathToPolyData.h [new file with mode: 0644]

diff --git a/plugins/cpExtensions/PolyLineParametricPathToPolyData.cxx b/plugins/cpExtensions/PolyLineParametricPathToPolyData.cxx
new file mode 100644 (file)
index 0000000..cd69303
--- /dev/null
@@ -0,0 +1,47 @@
+#include <cpExtensions/PolyLineParametricPathToPolyData.h>
+#include <cpInstances/DataObjects/PolyLineParametricPath.h>
+#include <cpInstances/DataObjects/Mesh.h>
+
+#include <cpExtensions/DataStructures/PolyLineParametricPath.h>
+#include <cpExtensions/Visualization/PolyLineParametricPathToPolyData.h>
+
+// -------------------------------------------------------------------------
+cpPluginscpExtensions::PolyLineParametricPathToPolyData::
+PolyLineParametricPathToPolyData( )
+  : Superclass( )
+{
+  this->_ConfigureInput< cpInstances::PolyLineParametricPath >(
+    "Input", true, false
+    );
+  this->_ConfigureOutput< cpInstances::DataObjects::Mesh >( "Output" );
+}
+
+// -------------------------------------------------------------------------
+cpPluginscpExtensions::PolyLineParametricPathToPolyData::
+~PolyLineParametricPathToPolyData( )
+{
+}
+
+// -------------------------------------------------------------------------
+void cpPluginscpExtensions::PolyLineParametricPathToPolyData::
+_GenerateData( )
+{
+  auto o = this->GetInputData( "Input" );
+  cpPlugins_Demangle_PolyLineParametricPath_All_1( o, _GD0 )
+    this->_Error( "Invalid input path." );
+}
+
+// -------------------------------------------------------------------------
+template< class _TPath >
+void cpPluginscpExtensions::PolyLineParametricPathToPolyData::
+_GD0( _TPath* path )
+{
+  typedef cpExtensions::Visualization::PolyLineParametricPathToPolyData< _TPath > _TFilter;
+
+  auto filter = this->_CreateVTK< _TFilter >( );
+  filter->SetInput( path );
+  filter->Update( );
+  this->GetOutput( "Output" )->SetVTK( filter->GetOutput( ) );
+}
+
+// eof - $RCSfile$
diff --git a/plugins/cpExtensions/PolyLineParametricPathToPolyData.h b/plugins/cpExtensions/PolyLineParametricPathToPolyData.h
new file mode 100644 (file)
index 0000000..f0bf178
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef __cpPluginscpExtensions__PolyLineParametricPathToPolyData__h__
+#define __cpPluginscpExtensions__PolyLineParametricPathToPolyData__h__
+
+#include <cpPlugins_cpExtensions_Export.h>
+#include <cpPlugins/Pipeline/ProcessObject.h>
+
+namespace cpPluginscpExtensions
+{
+  /**
+   */
+  class cpPlugins_cpExtensions_EXPORT PolyLineParametricPathToPolyData
+    : public cpPlugins::Pipeline::ProcessObject
+  {
+    cpPluginsObject(
+      PolyLineParametricPathToPolyData,
+      cpPlugins::Pipeline::ProcessObject,
+      cpExtensions
+      );
+
+  protected:
+    template< class _TPath >
+    inline void _GD0( _TPath* path );
+  };
+
+} // ecapseman
+
+#endif // __cpPluginscpExtensions__PolyLineParametricPathToPolyData__h__
+
+
+// eof - $RCSfile$