I want to load dicom.dic and private.dic before loading the DICOM file. How can I do this?
My first question would be: Why do you want to load the dictionary file(s) manually?
The sample code you've found on StackOverflow is not wrong but if you want to rely on the default dictionary files (determined during configure or specified by the environment variable DCMDICTPATH), you could also call reloadDictionaries() instead of loadDictionary().
I want to load dicom.dic and private.dic before loading the DICOM file. How can I do this?
My first question would be: Why do you want to load the dictionary file(s) manually?
The sample code you've found on StackOverflow is not wrong but if you want to rely on the default dictionary files (determined during configure or specified by the environment variable DCMDICTPATH), you could also call reloadDictionaries() instead of loadDictionary().
I don't know if I need to load it manually. I want to load both private/non-private tags from my own defined location. I''ve read the posts related to the environment variables but I don't understand how to do it...
You can specify the "data directory", where also the dictionary files are installed, during the configure step. Details can be found in the "datadict.txt" file of the source code package.