separated function to find center of gravity
changed importing, included function to check nonzero mean of volume. shifted some log output around
optional nonlinear registration