the slimline are regular laptops trayloads (same for the slot-load) that has an apple-designed adapter at the back that allows the cable that connects the CD-ROM and HDD on the same system to provide power to the CD-ROM. if you notice, the cable splits off part (or minus a few wires) that connects to the HDD, I think. At least it does on the DV. As far as the other wires, it goes to the board on the back of the CD. It then converts it to the CD-ROM standard Slim-line plug on any standard CD.
What I am saying is that the CD-ROMs in an iMac are the same as ANY laptop system. It's just slim-line slot-load vs. Slim-line Tray-load. You can use it. But you will need to do an awful lot of modifying, especially the front screen case. right under that front plastic, there is a hard plastic that has a little slot in it for the CD to go through the case into the CD-ROM. so you would need to take the ENTIRE iMac apart to cut an opening. Good luck with THAT. it's a PITA just getting to the monitor insides. I got an iMac DV sitting on my floor with a bummed screen Controller on the back of the tube died, PAV is fine) and am too lazy to put it back together. I also have a Slim-Line CD-ROM, but not sure if I want to give it up.