Assumed, the valves do close completely and liquid tight, you can do as follows for the nett combustion-chamber volume (nett would mean: total combustion-chamber volume (brutt) minus the part of the piston that protrudes into the combustion chamber):
-Mount the Pistons onto the rods and into the cylinders
-put the old head gasket on
-bring one piston in TDC
-measure how many Milimeters it measures above the head gasket (let's assume that is 5mm, just to explain the way to work...)
-now take that piston, a measuring or graduated jug slightly bigger than the piston and fill it to a certain mark with gas or any other liquid that has no or almost no surface tension.
-now you need a construction that is able to lower the piston very controlled for the 5mm (or what ever you measured the piston reaches above the old head gasket)
-now check how many ml the water rose due to that. If you want to have it very cranular, you can take a hose and a syringe and suck out water until you reach the level the water had without the piston...). Now you know what volume the piston takes in the combustion chamber.
Step 2: turn the head upside down, take a small (!!) syringe and gently fill the combustion chamber with the same liquid. Note the amount as brut volume. Now deduct this amount by the volume measured in Step 1 and you have the net combustion chamber volume.
This then can be put into relation to the diameter x stroke volume and you have the ratio. Easy, eh?
this is not 100% accurate, but close enough for a xx,x:1 value I feel.