enh(core): store correctly US enhanced volume DICOM attribute
Description
-
ImagePositionVolume
,ImageOrientationVolume
,FrameAcquisitionDateTime
DICOM attribute are now stored into sequence element when usingEnhenced US Volume
, as before for CT/MR. - DICOM Attributes and SOP classes definitions are generated from official documentation using python code. This allows friendlier operations (no need to remember exact tag values, or SOP uids).
- Unit tests have been updated to match changes and use generated DICOM tags, SOPClasses.
⚠ Generated file are huge ! they have been committed for convenience, but it is an open question to generate them at build time (it is fast !), or for time to time..
⚠ The drop in code covered by a unit test is due to the generated code, although there are generated a testd to partially cover this addition.
Python DICOM documentation parser / code generator
The parser libs/core/data/dicom/dicom_parser.py
downloads and reads the DICOM documentation and the class generator libs/core/data/dicom/class_generator.py
...generates Sop.hpp/cpp and Attribute.hpp/cpp. You can launch the parser "standalone" like:
python dicom_parser.py --sop-list "1.2.840.10008.5.1.4.1.1.6.2" --verbose
It will download all needed DICOM XML parts and parse them. Then it will display the list of IODs, modules, attributes that belongs to SOP "Enhanced US Volume Storage".
It may serve to easily find which tags are present in which SOP, the module usage (mandatory, conditional, etc.), or the attributes type. For example, to list all SOPs that use the attribute "FrameAcquisitionDateTime", you can use:
python dicom_parser.py --mandatory-tags "(0018,9074)"
Just try it :)
Closes #986 (closed)
How to test it?
Launch unit tests...