That won't work and the result will be wrong. Cranking compression gives an indication of the DYNAMIC compression ratio which is influenced by the valve opening/closing events, particularly the timing of intake valve closure.
To calculate the static compression ratio, you need to measure the cc of the following:
1. Combustion chambers
2. Piston dish or valve reliefs
3. Head gasket bore (you can calculate the bore volume if you know the bore diameter and compressed thickness)
4. Deck clearance volume (you can calculate that from the cylinder bore diameter and deck clearance)
I'll leave out the crevice volume (space between the cylinder bore and the piston from the crown to the upper ring) because that's negligible.