fill eas3_data form bwc_stream and bwc_codec

This commit is contained in:
Gregor Weiss 2024-11-05 11:07:24 +01:00
parent d631f693c9
commit d1bfb5236a
Signed by: Gregor Weiss
GPG key ID: 61E170A8BBFE5756

View file

@ -1550,9 +1550,32 @@ int main(int argc, char *argv[])
goto OUT; goto OUT;
} }
size = bwc_decompress(coder, stream); bwc_decompress(coder, stream);
//write_eas3(output, cli_output); size = coder->info.nX * coder->info.nY * coder->info.nZ *
coder->info.nTS * coder->info.nPar;
data->params.ndim1 = coder->info.nX;
data->params.ndim2 = coder->info.nY;
data->params.ndim3 = coder->info.nZ;
data->params.nts = coder->info.nTS;
data->params.npar = coder->info.nPar;
if (coder->info.data_prec == bwc_precision_single)
{
data->params.accuracy = 1;
data->field.d = NULL;
data->field.f = calloc(size, sizeof(float));
memcpy(data->field.f, stream->out, size);
}
else if (coder->info.data_prec == bwc_precision_double)
{
data->params.accuracy = 2;
data->field.f = NULL;
data->field.d = calloc(size, sizeof(double));
memcpy(data->field.d, stream->out, size);
}
//write_eas3(data, cli_output);
goto OUT; goto OUT;
} }