QIICR / dcmqi

dcmqi (DICOM for Quantitative Imaging) is a free, open source C++ library for conversion between imaging research formats and the standard DICOM representation for image analysis results
https://qiicr.gitbook.io/dcmqi-guide/
BSD 3-Clause "New" or "Revised" License
233 stars 62 forks source link

Expose "Laterality" in TID 1419 #358

Closed fedorov closed 5 years ago

fedorov commented 5 years ago

As pointed out by @pwighton, it may be important to support anatomic region modifiers in the measurement SRs. This can be done using row 3 of http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_A.html#sect_TID_1419, but is not exposed in dcmqi.

@jriesmeier I looked into implementing this. In the SR reader I iterate over all of the immediate children of TID 1411 http://dicom.nema.org/medical/dicom/current/output/chtml/part16/chapter_A.html#sect_TID_1411 to read selected items that I then output to the user in JSON. To support "Laterality", I need to look for children of "Finding Site" when I encounter it in this loop. There is getDown() method that I could use to do that, but I am not sure if it will keep the cursor intact, since I am already iterating over the content. Can you tell me what is the right way to handle this situation using dcmsr?

jriesmeier commented 5 years ago

@fedorov The DSRDocumentTreeNode::getDown() method is declared "const", so it does not change the internal state of the associated instance (which is in your case probably the "node" variable, right?). Alternatively, if you want to iterate on a subtree, I would recommend to create a new (local) cursor instance.