Main Content

dicomdict

Get or set active DICOM data dictionary

Description

example

dictionaryOut = dicomdict("get") returns the name of the active Digital Imaging and Communications in Medicine (DICOM) data dictionary file.

example

dicomdict("set",dictionaryIn) sets the file specified by input dictionaryIn as the active DICOM data dictionary. If the file is not found on the specified path, the function returns an error.

example

dicomdict("factory") restores the active DICOM data dictionary to its default value. The default value is a file in the MATLAB® path:

fullfile(matlabroot,"toolbox","images","iptformats","dicom-dict.txt")

Examples

collapse all

Find the default active DICOM data dictionary.

dictionaryOut = dicomdict("get")
dictionaryOut = 
'B:\matlab\toolbox\images\iptformats\dicom-dict.txt'

Specify the path to a new file to set as the active DICOM data dictionary.

dictionaryIn = "dicomdictnew.txt";
dicomdict("set",dictionaryIn)

Check if the active DICOM data dictionary has been updated to dicomdictnew.txt.

dictionaryOut1 = dicomdict("get");

Reset the active DICOM data dictionary to the default value. Verify the data dictionary path.

dicomdict("factory")
dictionaryOut2 = dicomdict("get")
dictionaryOut2 = 
'B:\matlab\toolbox\images\iptformats\dicom-dict.txt'

Input Arguments

collapse all

DICOM data dictionary file, specified as a character vector or string scalar. Data dictionary files must be of type .txt. DICOM-related functions use this dictionary unless you specify a different dictionary as input to function calls.

Data Types: char | string

Output Arguments

collapse all

Active DICOM data dictionary file, returned as a character vector or string scalar. Data dictionary files are of type .txt. The default value is:

fullfile(matlabroot,"toolbox","images","iptformats","dicom-dict.txt")

Version History

Introduced before R2006a