using local Pair interface and ValuePair class to circumvent problems with different Imglib2 versions