// doesn't fit the interval, will force unoptimized cursor
final long[] dimensionsUnoptimized = new long[] { 5001, 5000, 2, 2 };
// fits the interval, should be optimized
final Interval interval = new FinalInterval( new long[] { 0, 0, 1, 1 }, new long[] { 4999, 4999, 1, 1 } );
// create and fill images
final ArrayImg< IntType, ? > arrayImg = ArrayImgs.ints( dimensions ); // fits
// the
// interval