From 2893b9708e0ffe46265033e68c642db163d73a74 Mon Sep 17 00:00:00 2001
From: "Ankur Sinha (Ankur Sinha Gmail)" <sanjay.ankur@gmail.com>
Date: Wed, 1 Mar 2023 22:46:27 -0600
Subject: [PATCH 09/18] Update JlsParameters for new CharLS
Co-authored-by: Alessio <alciregi@fedoraproject.org>
---
dcmjpls/libsrc/djcodecd.cc | 4 ++--
dcmjpls/libsrc/djcodece.cc | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dcmjpls/libsrc/djcodecd.cc b/dcmjpls/libsrc/djcodecd.cc
index d67da4ad5..70a910786 100644
--- a/dcmjpls/libsrc/djcodecd.cc
+++ b/dcmjpls/libsrc/djcodecd.cc
@@ -416,8 +416,8 @@ OFCondition DJLSDecoderBase::decodeFrame(
if (params.width != imageColumns) result = EC_JLSImageDataMismatch;
else if (params.height != imageRows) result = EC_JLSImageDataMismatch;
else if (params.components != imageSamplesPerPixel) result = EC_JLSImageDataMismatch;
- else if ((bytesPerSample == 1) && (params.bitspersample > 8)) result = EC_JLSImageDataMismatch;
- else if ((bytesPerSample == 2) && (params.bitspersample <= 8)) result = EC_JLSImageDataMismatch;
+ else if ((bytesPerSample == 1) && (params.bitsPerSample > 8)) result = EC_JLSImageDataMismatch;
+ else if ((bytesPerSample == 2) && (params.bitsPerSample <= 8)) result = EC_JLSImageDataMismatch;
}
if (!result.good())
diff --git a/dcmjpls/libsrc/djcodece.cc b/dcmjpls/libsrc/djcodece.cc
index b780bc90a..748547065 100644
--- a/dcmjpls/libsrc/djcodece.cc
+++ b/dcmjpls/libsrc/djcodece.cc
@@ -649,13 +649,13 @@ OFCondition DJLSEncoderBase::compressRawFrame(
// Set up the information structure for CharLS
OFBitmanipTemplate<char>::zeroMem((char *) &jls_params, sizeof(jls_params));
- jls_params.bitspersample = bitsAllocated;
+ jls_params.bitsPerSample = bitsAllocated;
jls_params.height = height;
jls_params.width = width;
- jls_params.allowedlossyerror = 0; // must be zero for raw mode
+ jls_params.allowedLossyError = 0; // must be zero for raw mode
jls_params.outputBgr = false;
// No idea what this one does, but I don't think DICOM says anything about it
- jls_params.colorTransform = 0;
+ jls_params.colorTransformation = 0;
// Unset: jls_params.jfif (thumbnail, dpi)
// set parameters T1, T2, T3, MAXVAL and RESET.
@@ -1140,7 +1140,7 @@ OFCondition DJLSEncoderBase::compressCookedFrame(
frameBuffer = new Uint8[buffer_size];
framePointer = frameBuffer;
- result = convertToUninterleaved(frameBuffer, buffer, samplesPerPixel, width, height, jls_params.bitspersample);
+ result = convertToUninterleaved(frameBuffer, buffer, samplesPerPixel, width, height, jls_params.bitsPerSample);
}
#endif
--
2.39.2