How can I edit 'dicom-dict.mat' file?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I want to edit the 'dicom-dict.mat' file. I load dicomdict.mat file using the following command:
load dicom-dict
I obtain the variables TAGS and VALUES. I want to know the relation between the two variables. I also want to know the relation between the DICOM Dictionary MAT file and 'dicom-dict.txt' file.
Risposta accettata
MathWorks Support Team
il 27 Giu 2009
The ability to edit the DICOM data dictionary MAT-file ('dicom-dict.mat') though available in MATLAB is not recommended to be updated by end-users. Instead it is recommended that one updates the text file 'dicom-dict.txt'. Future versions of the Image Processing Toolbox may not use the MAT-file at all as it takes comparatively longer time to load the MAT-file and index into it than the human-readable text file.
To describe the relation between TAGS and VALUES variables, the TAGS matrix is a 65,536-by-65,536 element sparse matrix, where each entry is an index into the VALUES structure array. The row and column indices of TAGS matrix correspond to the group and element fields of the data dictionary (after adding 1for MATLAB's 1-based indexing). The fields in VALUES structure correspond to the various items in the text dictionary.
The only real difference between the MAT-file and text-based dictionary is that the MAT-file has already expanded "repeated group" attributes, such as this entry from the text dictionary:
(50xx,0005)USCurveDimensions1
The MAT-file expands the hex-like "50xx" placeholder into the values 20480, 20482, etc. (actually 20481, 20483, etc. after moving from 0-based to 1-based indexing). That's why there are more entries in the "tags" matrix than there are lines in the text dictionary.
Note that the default data dictionary is dicom-dict.mat. As explained earlier, the toolbox also includes a text version of this default data dictionary, dicom-dict.txt. If you want to create your own DICOM data dictionary, open the dicom-dict.txt file in a text editor, modify it, and save it under another name. Now you can use the function DICOMDICT to set the modified file dicom-dict.txt as the dictionary.
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su DICOM Format in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!