ENH: Fix Cppcheck warnings in RegisterImages

Change-Id: I3eb85d0f7f98390c9b996b7271e57d50dc6e136a
Merge topic 'FixRegisterImagesVariableScope'

42aeb52 ENH: Fix Cppcheck warnings in RegisterImages
ENH: Fix Cppcheck warnings in RegisterImages

Change-Id: I3eb85d0f7f98390c9b996b7271e57d50dc6e136a
Merge topic 'FixRegisterImagesVariableScope'

cd637e9 ENH: Fix Cppcheck warnings in RegisterImages