Hi Sander,
Sorry for not responding to your initial query. This error (
metadata not available) happens because you haven't defined a
module class. Every PixInsight module must define a descendant class of MetaModule.
I guess I know why this is happening
Statistics isn't a module, but just a tool that is part of the Image module. The Image module is a complex one with many processes and interfaces. It isn't a good choice to start a new module. Besides that, Statistics is a plain 'observer' tool without processing capabilities.
Instead of Image and trying to isolate Statistics (which requires some experience), use the GREYCstoration module. This module is good to start a new project because it contains a single process with a relatively simple interface. GREYCstoration is a normal process that runs on images, is maskable and previewable, so its structure doesn't impose any restrictions.
Make a copy of the GREYCstoration folder and play with it. Once you get it compiled, installed and running, rename the classes and files to your convenience, and 'empty' the process and interface classes. Of course, I can do this work for you; I'll make a 'skeleton' module and will upload it. With this empty module you'll be able to start building your magic
I'll try to do this with a VC++ project for you as soon as I can.
I'm really sorry for not being able to write a good tutorial on PCL development. It's an important gap that must be filled urgently, but you know how pressed I am. I do what I can! (actually, much more than I can, but don't tell anyone).