LandmarkRegistration works now. ApplyTransform was started. Upon further reading, I've concluded that I need to change how LandmarkRegistration writes the parameters to the file in order to make it readable to ApplyTransform. I'll work on that next. So the current LandmarkRegistration successfully registers the image and got rid of the malloc error upon termination but it does not produce and usable parameters file and ApplyTransform is good for nothing at the moment.