]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Plugins/BasicFilters/SphereMeshSource.cxx
More on graph editor
[cpPlugins.git] / lib / cpPlugins / Plugins / BasicFilters / SphereMeshSource.cxx
index 78aff5fbebf3ec19d0e5e0db59d279444a9f3c3f..2ed0b7d79abc994afe3a2fbcfe8e93af206516ca 100644 (file)
@@ -10,15 +10,16 @@ cpPlugins::BasicFilters::SphereMeshSource::
 SphereMeshSource( )
   : Superclass( )
 {
-  this->SetNumberOfInputs( 0 );
-  this->SetNumberOfOutputs( 1 );
-  this->_MakeOutput< cpPlugins::Interface::Mesh >( 0 );
-
-  double point[ 3 ] = { double( 0 ) };
-  this->m_Parameters->ConfigureAsPoint( "Center", 3, point );
-  this->m_Parameters->ConfigureAsReal( "Radius", 1 );
-  this->m_Parameters->ConfigureAsUint( "PhiResolution", 8 );
-  this->m_Parameters->ConfigureAsUint( "ThetaResolution", 8 );
+  this->_MakeOutput< cpPlugins::Interface::Mesh >( "Output" );
+
+  this->m_Parameters->ConfigureAsPoint( "Center" );
+  this->m_Parameters->ConfigureAsReal( "Radius" );
+  this->m_Parameters->ConfigureAsUint( "PhiResolution" );
+  this->m_Parameters->ConfigureAsUint( "ThetaResolution" );
+
+  this->m_Parameters->SetReal( "Radius", 1 );
+  this->m_Parameters->SetUint( "PhiResolution", 8 );
+  this->m_Parameters->SetUint( "ThetaResolution", 8 );
 }
 
 // -------------------------------------------------------------------------
@@ -47,7 +48,7 @@ _GenerateData( )
 
   // Execute filter
   cpPlugins::Interface::Mesh* out =
-    this->GetOutput< cpPlugins::Interface::Mesh >( 0 );
+    this->GetOutput< cpPlugins::Interface::Mesh >( "Output" );
   out->SetVTK( src->GetOutput( ) );
   return( "" );
 }