Index: CLAM/src/Processing/Controls/ControlPrinter.cxx =================================================================== --- CLAM/src/Processing/Controls/ControlPrinter.cxx (revision 10016) +++ CLAM/src/Processing/Controls/ControlPrinter.cxx (working copy) @@ -18,14 +18,17 @@ UpdateData(); SetIdentifier( "ControlPrinter" ); SetNumberOfInputs(1.); + SetGuiOnly(false); } ControlPrinter::ControlPrinter() + : mGuiOnly(false) { Configure( mConfig ); } ControlPrinter::ControlPrinter( const ControlPrinterConfig& cfg ) + : mGuiOnly(false) { Configure( cfg ); } @@ -39,7 +42,11 @@ RemoveOldControls(); CopyAsConcreteConfig( mConfig, cfg ); if (!mConfig.HasNumberOfInputs()) + { + mConfig.AddNumberOfInputs(); + mConfig.UpdateData(); mConfig.SetNumberOfInputs(1.); + } int nInputs = int(mConfig.GetNumberOfInputs()); if (nInputs < 1) nInputs = 1; if (nInputs == 1) @@ -55,11 +62,23 @@ mInControls.Resize(nInputs, mConfig.GetIdentifier(), this); } + + if (!mConfig.HasGuiOnly()) + { + mConfig.AddGuiOnly(); + mConfig.UpdateData(); + } + if (mConfig.GetGuiOnly()) + mGuiOnly = true; + return true; } bool ControlPrinter::Do() { + if (mGuiOnly) + return true; + std::string separator = ""; std::stringstream values; for (int i = 0; i < mInControls.Size(); i++) Index: CLAM/src/Processing/Controls/ControlPrinter.hxx =================================================================== --- CLAM/src/Processing/Controls/ControlPrinter.hxx (revision 10016) +++ CLAM/src/Processing/Controls/ControlPrinter.hxx (working copy) @@ -33,9 +33,10 @@ class ControlPrinterConfig : public ProcessingConfig { public: - DYNAMIC_TYPE_USING_INTERFACE (ControlPrinterConfig, 2, ProcessingConfig); + DYNAMIC_TYPE_USING_INTERFACE (ControlPrinterConfig, 3, ProcessingConfig); DYN_ATTRIBUTE (0, public, std::string, Identifier); DYN_ATTRIBUTE (1, public, TData, NumberOfInputs); + DYN_ATTRIBUTE (2, public, bool, GuiOnly ); private: void DefaultInit(); @@ -56,6 +57,8 @@ bool Do(); protected: void RemoveOldControls(); + private: + bool mGuiOnly; }; }