Fixed a bug in the pixel value inspector.

Fixed a bug where the pixel sample values are lost every time the viewer is updated. This bug was fixed by holding the sample values on the ImageView instead of the ImageViewGadget thereby making them persistent.
Closes issue #401.