if( this->m_Manual )
return;
+ // Check if an explicit re-execution button is needed
+ if( this->m_ProcessObject->GetCouldHaveExplicitReExecution( ) )
+ {
+ QCheckBox* v_bool =
+ this->findChild< QCheckBox* >( "___ExplicitReExecution___" );
+ if( v_bool != NULL )
+ this->m_ProcessObject->SetExplicitReExecution( v_bool->isChecked( ) );
+
+ } // fi
+
// Put values
auto parameters = this->m_ProcessObject->GetParameters( );
auto& raw_params = parameters->GetRawParameters( );
if( this->m_Manual )
return;
+ // Check if an explicit re-execution button is needed
+ if( this->m_ProcessObject->GetCouldHaveExplicitReExecution( ) )
+ {
+ QCheckBox* v_bool =
+ this->findChild< QCheckBox* >( "___ExplicitReExecution___" );
+ if( v_bool != NULL )
+ v_bool->setChecked( this->m_ProcessObject->GetExplicitReExecution( ) );
+
+ } // fi
+
// Put values
auto parameters = this->m_ProcessObject->GetParameters( );
auto& raw_params = parameters->GetRawParameters( );
<< "\"";
this->m_Title->setText( title.str( ).c_str( ) );
+ // Check if an explicit re-execution button is needed
+ if( this->m_ProcessObject->GetCouldHaveExplicitReExecution( ) )
+ {
+ QCheckBox* v_bool = new QCheckBox( this );
+ v_bool->setObjectName( "___ExplicitReExecution___" );
+ v_bool->setText( "Explicit re-execution" );
+ v_bool->setChecked( this->m_ProcessObject->GetExplicitReExecution( ) );
+
+ QHBoxLayout* new_layout = new QHBoxLayout( );
+ new_layout->addWidget( v_bool );
+ this->m_ToolsLayout->addLayout( new_layout );
+
+ } // fi
+
// Put values
auto parameters = this->m_ProcessObject->GetParameters( );
auto& raw_params = parameters->GetRawParameters( );
{
// Force upstream updates
auto i = this->m_Inputs.begin( );
- bool need_to_update = false;
+ bool need_to_update = this->m_CouldHaveExplicitReExecution;
+ need_to_update &= this->m_ExplicitReExecution;
for( ; i != this->m_Inputs.end( ); ++i )
{
bool iv = i->second.IsValid( );
cpPlugins::ProcessObject::
ProcessObject( )
: Superclass( ),
+ m_CouldHaveExplicitReExecution( false ),
+ m_ExplicitReExecution( false ),
m_LastExecutionTime( 0 ),
m_LastExecutionSpan( -1 ),
m_PrintExecution( false ),
itkTypeMacro( ProcessObject, Object );
cpPlugins_Id_Macro( ProcessObject, Object );
+ itkBooleanMacro( ExplicitReExecution );
itkBooleanMacro( PrintExecution );
+
+ itkGetConstMacro( ExplicitReExecution, bool );
+ itkGetConstMacro( CouldHaveExplicitReExecution, bool );
itkGetConstMacro( LastExecutionSpan, long );
itkGetConstMacro( PrintExecution, bool );
+
+ itkSetMacro( ExplicitReExecution, bool );
itkSetMacro( PrintExecution, bool );
itkSetObjectMacro( PrintExecutionStream, std::ofstream );
protected:
Parameters m_Parameters;
+ bool m_CouldHaveExplicitReExecution;
+ bool m_ExplicitReExecution;
typedef std::map< std::string, InputPort > _TInputs;
typedef std::map< std::string, OutputPort > _TOutputs;
float viewX = float( 0 ), viewY = float( 0 );
filter->QueryFloatAttribute( "ViewX", &viewX );
filter->QueryFloatAttribute( "ViewY", &viewY );
+ int explicit_re_execution = 0;
+ filter->QueryIntAttribute(
+ "ExplicitReExecution", &explicit_re_execution
+ );
if( class_value != NULL && name_value != NULL )
{
if( this->CreateFilter( category_value, class_value, name_value ) )
{
auto new_filter = this->GetFilter( name_value );
new_filter->SetViewCoords( viewX, viewY );
+ new_filter->SetExplicitReExecution( explicit_re_execution == 1 );
// Read parameters
auto parameters = new_filter->GetParameters( );
e->SetAttribute( "name", vIt->first.c_str( ) );
e->SetAttribute( "ViewX", filter->GetViewX( ) );
e->SetAttribute( "ViewY", filter->GetViewY( ) );
+ e->SetAttribute(
+ "ExplicitReExecution", ( filter->GetExplicitReExecution( ) )? 1: 0
+ );
auto params = filter->GetParameters( );
params->ToXML( doc, e );