Skip to content

Commit b26f8c9

Browse files
committed
Avoid wrong warning message on private pixel data.
Made sure that a warning message on compressed private pixel data is only reported if the element length is really undefined. Thanks to Mathieu Malaterre <[email protected]> for the original report.
1 parent ddc4a7c commit b26f8c9

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dcmdata/libsrc/dcitem.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4950,8 +4950,11 @@ OFCondition DcmItem::newDicomElement(DcmElement *&newElement,
49504950
// special handling for private pixel data (compressed or uncompressed)
49514951
if (newTag.getEVR() == EVR_px)
49524952
{
4953-
DCMDATA_WARN("DcmItem: Found private element " << tag << " with VR=" << tag.getVRName()
4954-
<< " and undefined length, reading a pixel sequence according to data dictionary");
4953+
if (length == DCM_UndefinedLength)
4954+
{
4955+
DCMDATA_WARN("DcmItem: Found private element " << tag << " with VR=" << tag.getVRName()
4956+
<< " and undefined length, reading a pixel sequence according to data dictionary");
4957+
}
49554958
newElement = new DcmPixelData(tag, length);
49564959
}
49574960
}

0 commit comments

Comments
 (0)