Current signature is
template <typename TPixel> static void AccessPixel(mitk::PixelType /*ptype*/, mitk::Image* im, mitk::Point3D p, int& val) template <typename TPixel> static void AccessPixel(mitk::PixelType /*ptype*/, const mitk::Image* im, mitk::Point3D p, int& val)
Question posed: Shouldn't be val of type TPixel&?
If we touch this part we should also rethink if this access method is either needed at all or if it shouldn't be in a more general place.