Removed imrotate to eliminate imaging toolbox dependency