From: Leonardo Flórez-Valencia Date: Tue, 21 Feb 2017 03:01:39 +0000 (-0500) Subject: ... X-Git-Tag: v0.1~5 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=8aec252963919f155cd49076f3da8b2e40968873;p=cpPlugins.git ... --- diff --git a/plugins/cpExtensions/PolyLineParametricPathToPolyData.cxx b/plugins/cpExtensions/PolyLineParametricPathToPolyData.cxx new file mode 100644 index 0000000..cd69303 --- /dev/null +++ b/plugins/cpExtensions/PolyLineParametricPathToPolyData.cxx @@ -0,0 +1,47 @@ +#include +#include +#include + +#include +#include + +// ------------------------------------------------------------------------- +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 index 0000000..f0bf178 --- /dev/null +++ b/plugins/cpExtensions/PolyLineParametricPathToPolyData.h @@ -0,0 +1,30 @@ +#ifndef __cpPluginscpExtensions__PolyLineParametricPathToPolyData__h__ +#define __cpPluginscpExtensions__PolyLineParametricPathToPolyData__h__ + +#include +#include + +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$