Real-time flat-panel pixel imaging system and control for X-ray and neutron detection