Hi Sander,
Congratulations on your first PixInsight module! Now I hope this is just the beginning of a beautiful friendship between you and PCL
Once I make that setting persistent (it's unlikely to change for a user after all) and figure out how to prevent the Debayer process from being added to the source image's history it can be tried by other folks.
As for the settings, have a look at the pcl/Settings.h standard header. Everything you need to get persistent settings for your module is in the Settings class.
Your process doesn't change its target image. You should add, if you haven't done so already, the following declaration/definition to your instance class (which is a descendent of ProcessImplementation):
bool IsHistoryUpdater( const View& ) const
{
return false;
}
In this way PI knows that your process doesn't modify a target view in its ExecuteOn() member function, and hence your process won't get added to the target view's processing history.
After adding the declaration above, your ExecuteOn() function should no longer lock views for read/write, since doing that can be interpreted as a hacking attempt. You must only lock views for writing:
view.LockForWrite();
instead of view.Lock(). Of course, you still have to call view.Unlock() to make sure that your routine will *never* leave a view locked.