Manual rigid registration done

Besides, an auxiliary function "maximize" added