Skip to content

Commit fb4eea1

Browse files
committed
Don't remove CIELab colors for monochr. labelmaps.
This regression has been introduced in 8bf5e5 and has not fully been fixed in later commits.
1 parent 2acac14 commit fb4eea1

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

libsrc/Bin2Label.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,12 @@ OFCondition DcmBinToLabelConverter::copySegments(DcmSegmentation* src, DcmSegmen
258258
DcmSegment* clonedSegment = srcSegment->second->clone(dest);
259259
if (clonedSegment)
260260
{
261-
clonedSegment->getIODRules()->deleteRule(DCM_RecommendedDisplayCIELabValue);
261+
if (m_convFlags.m_outputColorModel == DcmSegTypes::SLCM_PALETTE)
262+
{
263+
// Remove CIELab color from segment since in PALETTE mode the color is defined
264+
// in an ICC profile and the palette color lookup table
265+
clonedSegment->getIODRules()->deleteRule(DCM_RecommendedDisplayCIELabValue);
266+
}
262267
Uint16 segNumber = srcSegment->first;
263268
result = dest->addSegment(clonedSegment, segNumber);
264269
if (result.bad())

0 commit comments

Comments
 (0)