I have now managed to debayer an image using PCL in 5.7 seconds, down from 6.5 minutes using PJSR. All I have done is to add code to the SandBoxEngine apply function, and commented out the types I could not debayer in the ExecuteOn function. The routine will only debayer 32 bit images with an RGGB pattern, with an even number of rows and columns and it makes no assumptions that the source is a monochrome image. The GUI is the default sandbox one, but using the apply button does the trick.
I have now run out of time to make it more useful, but if anyone would like the source code to improve it I will send it to anybody interested. It may also be useful to someone just starting out with PCL. The code is very basic, as I have no previous experience with C or C++, in fact this was the first program that I was able to compile. I am unsure as to whether the algorithm is exactly the same one I used in the PJSR routine, as the output looks slightly different. Unfortunately the other routine went when the trial version of PI went.
If there is sufficient interest when I get time I will write up a complete idiots guide to getting started with PCL, authored by a complete idiot. It probably took me ten times as long to be in a position to write any code, than writing the code itself.
Regards Paul