X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FcpPlugins%2FPlugins%2FBasicFilters%2FMarchingCubes.cxx;h=625838c08f6d8d353e139069e713a9b230d98586;hb=3633aade338a13bc83642e99e6d61b6499e4b3af;hp=92538607d9b5b98cf2ab446b298bc5157f4e3bca;hpb=f2f39f66027a98bd8dac50bade5618e0136bbefa;p=cpPlugins.git diff --git a/lib/cpPlugins/Plugins/BasicFilters/MarchingCubes.cxx b/lib/cpPlugins/Plugins/BasicFilters/MarchingCubes.cxx index 9253860..625838c 100644 --- a/lib/cpPlugins/Plugins/BasicFilters/MarchingCubes.cxx +++ b/lib/cpPlugins/Plugins/BasicFilters/MarchingCubes.cxx @@ -11,13 +11,10 @@ cpPlugins::BasicFilters::MarchingCubes:: MarchingCubes( ) : Superclass( ) { - this->SetNumberOfInputs( 1 ); - this->SetNumberOfOutputs( 1 ); - this->_MakeOutput< cpPlugins::Interface::Mesh >( 0 ); + this->_AddInput( "Input" ); + this->_MakeOutput< cpPlugins::Interface::Mesh >( "Output" ); - using namespace cpPlugins::Interface; - this->m_DefaultParameters.Configure( Parameters::RealList, "Thresholds" ); - this->m_Parameters = this->m_DefaultParameters; + this->m_Parameters->ConfigureAsRealList( "Thresholds" ); } // ------------------------------------------------------------------------- @@ -32,7 +29,7 @@ _GenerateData( ) { // Get input cpPlugins::Interface::Image* image = - this->GetInput< cpPlugins::Interface::Image >( 0 ); + this->GetInput< cpPlugins::Interface::Image >( "Input" ); if( image == NULL ) return( "MarchingCubes: Input data is not a valid image." ); vtkImageData* vtk_image = image->GetVTK< vtkImageData >( ); @@ -40,7 +37,7 @@ _GenerateData( ) return( "MarchingCubes: Input does not have a valid VTK conversion." ); std::vector< double > values; - this->m_Parameters.GetValueAsRealList( values, "Thresholds" ); + this->m_Parameters->GetRealList( values, "Thresholds" ); vtkPolyData* pd = NULL; if( vtk_image->GetDataDimension( ) == 2 ) { @@ -66,7 +63,7 @@ _GenerateData( ) // Execute filter cpPlugins::Interface::Mesh* out = - this->GetOutput< cpPlugins::Interface::Mesh >( 0 ); + this->GetOutput< cpPlugins::Interface::Mesh >( "Output" ); out->SetVTK( pd ); return( "" ); }