Medical image processing: applications in ophthalmology and total hip replacement