private List<ImageDataElement> getRawImageDataElements(final TiffField offsetsField, final TiffField byteCountsField) throws ImagingException {
        final long[] offsets = offsetsField.getLongArrayValue();
        final int[] byteCounts = byteCountsField.getIntArrayValue();

        if (offsets.length != byteCounts.length) {
            throw new ImagingException("offsets.length(" + offsets.length + ") != byteCounts.length(" + byteCounts.length + ")");
        }

        final List<ImageDataElement> result = Allocator.arrayList(offsets.length);
        for (int i = 0; i < offsets.length; i++) {
            result.add(new ImageDataElement(offsets[i], byteCounts[i]));
        }
        return result;
    }
Reads the numerical data stored in this TIFF directory, if available. Note that this method is defined only for TIFF directories that contain
floating-point data or two-byte signed integer data.
<p>
TIFF directories that provide numerical data do not directly specify images, though it is possible to interpret the data as an image using this library.
TIFF files may contain multiple directories which are allowed to have different formats. Thus it is possible for a TIFF file to contain a mix of image
and floating-point raster data.
<p>
If desired, sub-image data can be read from the file by using a Java Map instance to specify the subsection of the image that is required. The following
code illustrates the approach:

<pre>
int x; // coordinate (column) of corner of sub-image
int y; // coordinate (row) of corner of sub-image
int width; // width of sub-image
int height; // height of sub-image

Map&lt;String, Object&gt; params = new HashMap&lt;&gt;();
params.put(TiffConstants.PARAM_KEY_SUBIMAGE_X, x);
params.put(TiffConstants.PARAM_KEY_SUBIMAGE_Y, y);
params.put(TiffConstants.PARAM_KEY_SUBIMAGE_WIDTH, width);
params.put(TiffConstants.PARAM_KEY_SUBIMAGE_HEIGHT, height);
TiffRasterData raster = directory.readFloatingPointRasterData(params);
</pre>

@param params an optional parameter map instance
@return a valid instance
@throws ImagingException in the event of incompatible or malformed data
@throws IOException      in the event of an I/O error
src/main/java/org/apache/commons/imaging/formats/tiff/TiffDirectory.java