)
IF(USE_QT4)
LIST(APPEND _all_libs cpBaseQtApplication)
+ LIST(APPEND _all_libs cp_QCustomPlot)
ENDIF(USE_QT4)
SET(cpPlugins_Libraries ${_all_libs} CACHE STRING "cpPlugins base libraries")
MARK_AS_ADVANCED(FORCE cpPlugins_Libraries)
#include <cpExtensions/Visualization/Simple3DCurveToPolyData.h>
// -------------------------------------------------------------------------
-void cpInstances::Simple3DCurve::
+void cpInstances::DataObjects::Simple3DCurve::
SetVTK( vtkObjectBase* o )
{
// Do nothing
}
// -------------------------------------------------------------------------
-cpInstances::Simple3DCurve::
+cpInstances::DataObjects::Simple3DCurve::
Simple3DCurve( )
: Superclass( )
{
}
// -------------------------------------------------------------------------
-cpInstances::Simple3DCurve::
+cpInstances::DataObjects::Simple3DCurve::
~Simple3DCurve( )
{
}
// -------------------------------------------------------------------------
-void cpInstances::Simple3DCurve::
+void cpInstances::DataObjects::Simple3DCurve::
_UpdateVTK( ) const
{
auto i = const_cast< itk::LightObject* >( this->m_ITK.GetPointer( ) );
// -------------------------------------------------------------------------
template< class _TCurve >
-void cpInstances::Simple3DCurve::
+void cpInstances::DataObjects::Simple3DCurve::
_ITK_2_VTK( _TCurve* curve ) const
{
typedef
-#ifndef __cpInstances__Simple3DCurve__h__
-#define __cpInstances__Simple3DCurve__h__
+#ifndef __cpInstances__DataObjects__Simple3DCurve__h__
+#define __cpInstances__DataObjects__Simple3DCurve__h__
#include <cpInstances/cpPluginsDataObjects_Export.h>
#include <cpPlugins/Pipeline/DataObject.h>
// -------------------------------------------------------------------------
namespace cpInstances
{
- /**
- */
- class cpPluginsDataObjects_EXPORT Simple3DCurve
- : public cpPlugins::Pipeline::DataObject
+ namespace DataObjects
{
- public:
- typedef Simple3DCurve Self;
- typedef cpPlugins::Pipeline::DataObject Superclass;
- typedef itk::SmartPointer< Self > Pointer;
- typedef itk::SmartPointer< const Self > ConstPointer;
-
- public:
- itkNewMacro( Self );
- itkTypeMacro( Simple3DCurve, cpPlugins::Pipeline::DataObject );
- cpPlugins_Id_Macro( Simple3DCurve, Object );
- cpPlugins_Compatibility_Macro;
-
- public:
- virtual void SetVTK( vtkObjectBase* o ) cpPlugins_OVERRIDE;
-
- protected:
- Simple3DCurve( );
- virtual ~Simple3DCurve( );
-
- virtual void _UpdateVTK( ) const cpPlugins_OVERRIDE;
-
- template< class _TCurve >
- inline void _ITK_2_VTK( _TCurve* curve ) const;
-
- private:
- // Purposely not implemented
- Simple3DCurve( const Self& );
- Self& operator=( const Self& );
-
- protected:
- vtkSmartPointer< vtkPolyDataAlgorithm > m_ITKvVTK;
- };
+ /**
+ */
+ class cpPluginsDataObjects_EXPORT Simple3DCurve
+ : public cpPlugins::Pipeline::DataObject
+ {
+ public:
+ typedef Simple3DCurve Self;
+ typedef cpPlugins::Pipeline::DataObject Superclass;
+ typedef itk::SmartPointer< Self > Pointer;
+ typedef itk::SmartPointer< const Self > ConstPointer;
+
+ public:
+ itkNewMacro( Self );
+ itkTypeMacro( Simple3DCurve, cpPlugins::Pipeline::DataObject );
+ cpPlugins_Id_Macro( Simple3DCurve, Object );
+ cpPlugins_Compatibility_Macro;
+
+ public:
+ virtual void SetVTK( vtkObjectBase* o ) cpPlugins_OVERRIDE;
+
+ protected:
+ Simple3DCurve( );
+ virtual ~Simple3DCurve( );
+
+ virtual void _UpdateVTK( ) const cpPlugins_OVERRIDE;
+
+ template< class _TCurve >
+ inline void _ITK_2_VTK( _TCurve* curve ) const;
+
+ private:
+ // Purposely not implemented
+ Simple3DCurve( const Self& );
+ Self& operator=( const Self& );
+
+ protected:
+ vtkSmartPointer< vtkPolyDataAlgorithm > m_ITKvVTK;
+ };
+
+ } // ecapseman
} // ecapseman
// -------------------------------------------------------------------------
cpPlugins::Interface::Workspace::
TFilter* cpPlugins::Interface::Workspace::
-CreateFilter( const std::string& category, const std::string& filter )
+CreateFilter(
+ const std::string& category, const std::string& filter,
+ const std::string& name
+ )
{
typedef cpPlugins::Pipeline::Widget _TWidget;
if( o.IsNotNull( ) )
{
// Choose a name
- std::string name = filter;
- while( this->GetFilter( name ) != NULL )
- name += std::string( "_" );
+ std::string real_name = name;
+ while( this->GetFilter( real_name ) != NULL )
+ real_name += std::string( "_" );
o->SetPrintExecution( this->m_PrintExecution );
- o->SetName( name );
+ o->SetName( real_name );
// Interactors
for(
o->AddInteractor( *i );
// Finish association
- this->m_Filters[ name ] = o;
+ this->m_Filters[ real_name ] = o;
} // fi
return( o.GetPointer( ) );
}
+// -------------------------------------------------------------------------
+cpPlugins::Interface::Workspace::
+TFilter* cpPlugins::Interface::Workspace::
+CreateFilter( const std::string& category, const std::string& filter )
+{
+ return( this->CreateFilter( category, filter, filter ) );
+}
+
// -------------------------------------------------------------------------
bool cpPlugins::Interface::Workspace::
RenameFilter( const std::string& old_name, const std::string& new_name )
const TWidget* GetWidget( const std::string& name ) const;
bool HasFilter( const std::string& name ) const;
bool HasWidget( const std::string& name ) const;
+ TFilter* CreateFilter(
+ const std::string& category, const std::string& filter,
+ const std::string& name
+ );
TFilter* CreateFilter(
const std::string& category, const std::string& filter
);
: Superclass( )
{
typedef cpInstances::DataObjects::Image _TImage;
- typedef cpInstances::Simple3DCurve _TCurve;
+ typedef cpInstances::DataObjects::Simple3DCurve _TCurve;
this->_ConfigureInput< _TImage >( "Image", true, false );
this->_ConfigureInput< _TCurve >( "Curve", true, false );
this->_ConfigureOutput< _TImage >( "Output" );
this->_ConfigureInput< cpInstances::PolyLineParametricPath >(
"Input", true, false
);
- this->_ConfigureOutput< cpInstances::Simple3DCurve >( "Output" );
+ this->_ConfigureOutput< cpInstances::DataObjects::Simple3DCurve >( "Output" );
this->m_Parameters.ConfigureAsUint( "NumberOfSamples", 0 );
}