- /*
- if( this->m_Plugins->CreateFilter( filter, name ) )
- {
- if( filter->ExecConfigurationDialog( this ) )
- {
- filter->SetInput( "Input", this->m_MainImage );
- this->_Block( );
- err = filter->Update( );
- this->_Unblock( );
- TPlugins::TMesh::Pointer mesh =
- filter->GetOutput< TPlugins::TMesh >( "Output" );
- this->m_Meshes.push_back( mesh );
- mesh->CreateVTKActor( );
- vtkActor* actor = mesh->GetVTKActor( );
- if( actor != NULL )
- this->m_UI->MPR->Add3DActor( actor );
-
- } // fi
-
- } // fi
- }
- else
- QMessageBox::critical(
- this,
- tr( "Error creating filter" ),
- tr( "No valid filter defined." )
- );
- */
- /*
- if( name == "cpPlugins::BasicFilters::FloodFillImageFilter" )
- {
- this->m_Flooding = true;
- }
- else
- {
- this->m_Flooding = false;
- this->m_UI->MPR->ExecuteFilter(
- name, this->m_ImageLoaded, "SegmentedImage"
- );
-
- } // fi
- */
-
- // Configure filter
- /*
- TPluginFilter::Pointer filter =
- this->m_Plugins.CreateProcessObject( name );
- bool dlg_ok = filter->ExecConfigurationDialog( NULL );
- if( !dlg_ok )
+ // Configure paramereters
+ auto dlg_res = this->m_Plugins.ConfigureActiveFilter( );
+ if( dlg_res == TPlugins::TProcessObject::DialogResult_Cancel )
+ {
+ // Just deactivate filter, since it was canceled
+ this->m_Plugins.DeactivateFilter( );