Fix loop and data type in LevelWindow::SetAuto()
Fix loop and data type in LevelWindow::SetAuto()

Summary:
The loop took the first image dimension 2x into account.
The data type of the counting var was too small to handle medium to large sized images.

Fixes T27885.

Test Plan: Ran LevelWindow tests and checked manually whether the default image appearance changed.

Reviewers: O1 MITK Reviewer Group I, floca

Reviewed By: O1 MITK Reviewer Group I, floca

Maniphest Tasks: T27885

Differential Revision: https://phabricator.mitk.org/D430

MITK/MITK,MITK/MITK,MITK/MITK,MITK/MITK,MITK/MITK,MITK/MITK