You don't have to take the drive out.
Here's what I'd suggest.
You'll need an EXTERNAL USB drive of some kind. It should be large enough to hold the contents of your Mac partition.
Then, do this:
1. Power down (all the way off) and connect the external drive.
2. Press the power on button and IMMEDIATELY hold down "command-OPTION-R" to boot into INTERNET recovery (NOT "the recovery partition)
3. You'll see the "internet symbol" and if you're connected via wifi you'll probably have to enter your wifi password.
4. When you get to the utilities menu, if the OS installer is open, quit it.
5. Open Disk Utility and ERASE the EXTERNAL drive to Mac OS extended with journaling enabled, GUID partition format.
6. When done, close Disk Utility and re-open the OS installer.
7. The installer will offer to show you ALL connected drives. POINT IT at the EXTERNAL drive
8. Now, choose to install a clean copy of the OS onto the EXTERNAL drive. The Mac may reboot once or twice, and the process will take some time. BE PATIENT.
9. When done, you should see an "initial setup screen" for the new install on the external drive. So... go ahead and "set it up" with a username and password.
10. I'm not sure if these next steps will work, you're going to have to try it.
11. As you go through setup, when you get to the part where setup assistant asks if you want to import data from another drive, YES, you want to do this.
12. Does setup assistant "see" the Mac partition on the internal drive (even if you couldn't "boot from it")?
13. If it does, leave EVERYTHING checked and go ahead and see if setup assistant can "import" the contents of the Mac partition of the internal drive.
OK... does this work?
If so, you have now recovered your personal data and apps to the EXTERNAL drive.
From this point, you can begin work on getting the internal drive "back into shape".
Even if setup assistant can't migrate the data, YOU'LL STILL HAVE A BOOTABLE MAC DRIVE from which to boot the iMac.
My best advice:
DO NOT USE Bootcamp in the future.
Use either an emulated solution (VMWare fusion or Parallels)... or...
Get a cheap PC and use that instead.