@Test
    void test() throws Exception {
        // we set up the 32 and 64 bit test cases. At this time,
        // the Tile format is not supported for floating-point samples by the
        // TIFF datareaders classes. So that format is not yet exercised.
        // Note also that the compressed floating-point with predictor=3
        // is processed in other tests, but not here.
        final List<File> testFiles = new ArrayList<>();
        testFiles.add(writeFile(ByteOrder.LITTLE_ENDIAN, false, false, TiffPlanarConfiguration.CHUNKY));
        testFiles.add(writeFile(ByteOrder.BIG_ENDIAN, false, false, TiffPlanarConfiguration.CHUNKY));
        testFiles.add(writeFile(ByteOrder.LITTLE_ENDIAN, true, false, TiffPlanarConfiguration.CHUNKY));
        testFiles.add(writeFile(ByteOrder.BIG_ENDIAN, true, false, TiffPlanarConfiguration.CHUNKY));
        testFiles.add(writeFile(ByteOrder.LITTLE_ENDIAN, false, false, TiffPlanarConfiguration.PLANAR));
        testFiles.add(writeFile(ByteOrder.BIG_ENDIAN, false, false, TiffPlanarConfiguration.PLANAR));
        testFiles.add(writeFile(ByteOrder.LITTLE_ENDIAN, true, false, TiffPlanarConfiguration.PLANAR));
        testFiles.add(writeFile(ByteOrder.BIG_ENDIAN, true, false, TiffPlanarConfiguration.PLANAR));

        // To exercise the horizontal-differencing-predictor logic, we include a writer that will
        // reorganize the bytes into the form used by the floating-pont horizontal predictor.
        // This test does not apply data compression, but it does apply the predictor.
        // Note that although the TIFF predictor does not require big-endian formats, per se,
        // the test logic implemented here does.
        testFiles.add(writeFile(ByteOrder.BIG_ENDIAN, true, true, TiffPlanarConfiguration.PLANAR));

        for (final File testFile : testFiles) {
            final String name = testFile.getName();
            final ByteSource byteSource = ByteSource.file(testFile);
            final TiffReader tiffReader = new TiffReader(true);
            final TiffContents contents = tiffReader.readDirectories(byteSource, true, // indicates that application should read image data, if present
                    FormatCompliance.getDefault());
            final TiffDirectory directory = contents.directories.get(0);
            final AbstractTiffRasterData raster = directory.getRasterData(new TiffImagingParameters());
            assertNotNull(raster, "Failed to get raster from " + name);
            assertEquals(2, raster.getSamplesPerPixel(), "Invalid samples per pixel in " + name);
            for (int iPlane = 0; iPlane < 2; iPlane++) {
                final int pOffset = iPlane * width * height;
                for (int iRow = 0; iRow < height; iRow++) {
                    for (int iCol = 0; iCol < width; iCol++) {
                        final int index = pOffset + iRow * width + iCol;
                        final float tValue = fSample[index];
                        final float rValue = raster.getValue(iCol, iRow, iPlane);
                        assertEquals(tValue, rValue, "Failed at index x=" + iCol + ", y=" + iRow + ", iPlane=" + iPlane);
                    }
                }
            }
        }
    }
Gets the bytes for output for a 32 bit floating point format. Note that this method operates over "blocks" of data which may represent either TIFF Strips
or Tiles. When processing strips, there is always one column of blocks and each strip is exactly the full width of the image. When processing tiles,
there may be one or more columns of blocks and the block coverage may extend beyond both the last row and last column.

@param f            an array of the grid of output values in row major order
@param width        the width of the overall image
@param height       the height of the overall image
@param nRowsInBlock the number of rows in the Strip or Tile
@param nColsInBlock the number of columns in the Strip or Tile
@param byteOrder    little-endian or big-endian
@return a valid array of equally sized array.
src/test/java/org/apache/commons/imaging/formats/tiff/TiffFloatingPointMultivariableTest.java