#include "main.h"
#include "support.h"
{
TEST_BOOL(reader != NULL);
const LTIScene scene(0, 0, 256, 256, 1.0);
scene.getNumCols(),
scene.getNumRows(),
NULL);
TEST_SUCCESS(reader->
read(scene, sceneBuffer));
FILE *file = fopen(OUTPUT_PATH("Tile7_rgbn_utm15-ia.bsq"), "wb");
lt_uint16 numBands = pixelProps.getNumBands();
for(
lt_uint16 band = 0; band < numBands; band++)
{
lt_uint32 bytesPerSample = pixelProps.getSample(band).getNumBytes();
lt_uint32 numPixels = sceneBuffer.getNumCols() *
sceneBuffer.getNumRows();
void *bandBuffer = sceneBuffer.getBandData(band);
if(sceneBuffer.getNumCols() != sceneBuffer.getTotalNumCols())
if(fwrite(bandBuffer, bytesPerSample, numPixels, file) != numPixels)
}
fclose(file);
TEST_BOOL(Compare(OUTPUT_PATH("Tile7_rgbn_utm15-ia.bsq"), INPUT_PATH("Tile7_rgbn_utm15-ia.bsq")));
Remove(OUTPUT_PATH("Tile7_rgbn_utm15-ia.bsq"));
}