Yesterday, I’ve committed a patch to DCMTK’s git repository that adds two new output options to the DICOM Structured Report (SR) tool dsrdump:
+C --print-color use ANSI escape codes for colored output
-C --no-color do not use any ANSI escape codes (default)
The same options are already supported by dcmdump from the official DCMTK 3.6.0 release. So now, the textual output of dsrdump also uses colors if needed. This kind of syntax highlighting is intended to improve the readability, especially of large SR documents with many content items. Since the output of dsrdump is created by the print() method, this new feature is also available to DCMTK developers.
Unfortunately, the new color options are not (yet) available on Windows systems since the Windows console does not support ANSI escape codes. Why does Microsoft always need its own “solutions”?