Mahesh,
Thank you for posting.
This looks like a perfect example of how to load an additional tag to the Default dictionary at run-time.
However, what I would like to do is actually add the tag to the "internal/default" dictionary that is loaded from the library itself.
Seems conceptually simple, but I'm still missing something.
My most recent attempt was to eliminate the gzip encoding of the dictionary XML resource - in case 7-zip did not create a compatible ".gz" format.
So, I removed the ".gz" as an embedded resource and made the uncompressed "XML" file as the embedded resource.
Then modified the LoadInternalDictionaries( ) method in the Properties #region of DicomDictionary class definition (in DicomDictionary.cs) as follows...
private static void LoadInternalDictionaries() {
lock (_lock) {
if (_default == null) {
_default = new DicomDictionary();
_default.Add(new DicomDictionaryEntry(DicomMaskedTag.Parse("xxxx", "0000"), "Group Length", "GroupLength", DicomVM.VM_1, false, DicomVR.UL));
try {
var assembly = Assembly.GetExecutingAssembly();
var stream = assembly.GetManifestResourceStream("Dicom.Dictionaries.DICOM Dictionary.xml");
var reader = new DicomDictionaryReader(_default, DicomDictionaryFormat.XML, stream);
reader.Process();
This all builds fine, but I'm still not seeing my new tag recognized as a DicomDictionaryEntry in the Default dictionary.
Anyone know what I'm missing?
Thanks.
-Paul