By default the Time Capsule drive does not have the Mac OS installed on it. Be careful you don't erase your backup files if you use Time Machine when you install the OS on to it.
In addition the Time Machine backup files won't be accessible if you forgot your Time Machine user account and password (stored in the current iMac HD system files).
If you do care about getting to your saved files on the Time Capsule it maybe better getting a new external HD case to put the Time Capsule HD into so you can access it via Firewire (best) or USB cable Vs swapping out the your iMac systems HD drive.
With the external case you can also upgrade your iMac system HD with a bigger HD with a new HD, by using the migration assistant to image your current HD onto the new HD held in the external case. Then once you swap your iMac system drive with the new HD you can then take the Time Capsule HD out and put it into the new external case and continue using it as a backup. As you made a full image of your current iMac HD you won't have lost your Time Machine user account or password that is stored in your iMac system files his way.