This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

dicomdict

Get or set active DICOM data dictionary

Syntax

dictionaryOut = dicomdict('get')
dicomdict('set',dictionaryIn)
dicomdict('factory')

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 in 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 = 
'/mathworks/devel/bat/Bdoc19a/build/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 is updated to 'dicomdictnew'.

dictionaryOut1 = dicomdict('get')
dictionaryOut1 = 
'/tmp/Bdoc19a_1099451_109200/tp5dcefd65/images-ex49312738/dicomdictnew.txt'

Reset the active DICOM data dictionary to the default value and verify the same.

dicomdict('factory')
dictionaryOut2 = dicomdict('get')
dictionaryOut2 = 
'/mathworks/devel/bat/Bdoc19a/build/matlab/toolbox/images/iptformats/dicom-dict.txt'

Input Arguments

collapse all

DICOM data dictionary file of type .txt to be set as active, specified as a character vector or string scalar.

Data Types: char | string

Output Arguments

collapse all

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

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

Introduced before R2006a