/* This macro demonstrates how to do string processing. What it does is convert the DICOM data dictionary from Part 6 of the DICOM standard, which looks like this: (0054,0011) Number of Energy Windows US 1 (0054,0012) Energy Window Information Sequence SQ 1 (0054,0020) Detector Vector US 1-n to the format used by ImageJ in DICOM.java: "054,0011=USumber of Energy Windows", "00540012=SQEnergy Window Information Sequence", "00540020=USDetector Vector", The input dictionary is assumed to be in a text window named 'dict.txt'. The output is displayed in the "Log" window. */ name = 'dict.txt'; selectWindow(name); data=getInfo(); data = split(data, '\n'); for (i=0; i