Active Pixel Detectors in CMOS technology