RT now generates valid 16-bit float TIFF output image (see #2357)

...however the "reader" of those files is broken and make RT crash.

Thanks to @heckflosse for the "writer" patch.
This commit is contained in:
Hombre
2018-05-10 22:13:06 +02:00
parent 3044cd80c9
commit b356c74813
8 changed files with 166 additions and 96 deletions

View File

@@ -60,7 +60,7 @@ Image16::~Image16 ()
{
}
void Image16::getScanline (int row, unsigned char* buffer, int bps)
void Image16::getScanline (int row, unsigned char* buffer, int bps, bool isFloat)
{
if (data == nullptr) {
@@ -74,20 +74,13 @@ void Image16::getScanline (int row, unsigned char* buffer, int bps)
}
}
/*
* void Image16::setScanline (int row, unsigned char* buffer, int bps, int minValue[3], int maxValue[3]);
* has not been implemented yet, because as of now, this method is called for IIOSF_FLOATxx sample format only
*/
void Image16::setScanline (int row, unsigned char* buffer, int bps, unsigned int numSamples, float *minValue, float *maxValue)
void Image16::setScanline (int row, unsigned char* buffer, int bps, unsigned int numSamples)
{
if (data == nullptr) {
return;
}
// For optimization purpose, we're assuming that this class never has to provide min/max bounds
assert(!minValue);
switch (sampleFormat) {
case (IIOSF_UNSIGNED_CHAR): {
int ix = 0;