79652664

Date: 2025-06-04 11:40:00
Score: 1.5
Natty:
Report link

The short answer is: Instead of getParentItem() you should call getParent() on the item in order to get the SQ element that contains this item, because a DcmSequenceOfItems is not a DcmItem. However, DcmDataset is derived from DcmItem, that's why you get the top-level DICOM data set when you call getParentItem() on an item of a top-level SQ element. All this information should also be available from the API documentation (if not, please let me know and I'll improve it).

In principle, the DcmPathProcessor could do what you want, but it is currently rather limited in terms of functionality and only supports the other direction, i.e. finds an item or element (or even multiple) from a given path.

Reasons:
  • RegEx Blacklisted phrase (2.5): please let me know
  • Long answer (-0.5):
  • Has code block (-0.5):
Posted by: J. Riesmeier