Creating C code to calculate the radius ratio to the edge of the signal in a volume