Wouldn't it be possible to pass some parameter through intermodule communication, to override DSLR_RAW configuration when loading image on demand?
The II or IC modules must know nothing about any particular format module. This preserves isolation between processes and data (images). This is a fundamental design principle of PixInsight, and one of the main keys of its strength.
The functionality that you're proposing, that is the ability to override the default settings of a particular format, must be implemented without violating the principles of modularity and encapsulation. A possibility is a system based on "hints".
For example, on most GUI environments, one usually passes one or more hints to the windowing system to create a widget with some particular features. A top-level window can have a maximization button, if the system or a particular combination of features support it. The application requests the maximization feature through a hint flag passed to the window constructor:
foo = CreateWindow( ... , MAXIMIZE_BUTTON );
We could have a similar system to create format instances in PCL (a format instance is the abstraction that PCL uses to manage image files). This could be an additional argument passed to the FileFormatImplementation::Open member function. The prototype of this function is now:
virtual ImageDescriptionArray FileFormatImplementation::Open( const String& filePath );
It could be:
virtual ImageDescriptionArray FileFormatImplementation::Open( const String& filePath, FileFormatHints hints = FileFormatHints::NoHints );
where FileFormatHints would be a collection of flags requesting specific format features. One of these flags could be:
FileFormatHint::RawData
which in the case of the DSLR_RAW module would select a set of settings to load pure raw data (no debayerization, no black pedestal, no white balance, etc.).
This is interesting indeed. What do you think? Guess I'm gonna draw it on a paper sheet
