Single composite image acquisition

Hello everyone, I should solve a somewhat complex question:
I would like to use multiacquisition in micromanager, but I would like every single image acquired by micromanager to be actually a processed image resulting from multiple frames acquired by the camera controlled by a hardware trigger.
I thought of writing a device adapter that behaves like a camera that detects n frames from the installed camera and after processing it returns only one frame processed to micromanager.
The problem is that I don’t know how to “link” a camera installed in micromanager to the device adapter and how to reference it in the device adapter code.
Can anyone help me or have a better idea?
Thanks in advance,
Salvatore

You can do this in Python with Pycro-Manager pretty easily using an image processor. This example of a max intensity projection shows how to implement a many-to-one image processor

The FrameCombiner Processor (Plugins > On-the-Fly Processing > Frame Combiner) may be what you are looking for.

Thank you very much Henry and Nico. These days I will try to write a plugin following your instructions.