Registration of 3D Ultrasound Volumes with Applications in Neurosurgery and Prostate Radiotherapy