We want Information (Dicom Information)

PatrickMcGoohan

And so continuing with updating our legacy leadtools application from v14.5 to v19 of the Medical Suite I came across something which had me scratching my head for a little while and I thought as it did I would like to share it with the community so that others hopefully don’t have the same issue.

The issue I was having was related to loading a trying to Insert a module (and the related attributes) into a dataset. For some reason it just would not work. I then stepped back and compared my legacy code with the new code and came across the following anomaly. The InformationClass was not set in my new code. Odd….I was expecting to see it as a type CTImage. I then retraced my code and noticed that the newer libraries did not have the equivalent GetInfoDS method which seemingly loaded this information. So I dug and dug looking to see if a more object orientated approach had been taken to this population but all of my searches drew a blank. I suspected that I had arrived at the answer but the solution still eluded me.

A little later I saw a post on a forum that pointed me to my omission, I needed to add a reference to the Leadtools.Dicom.Tables.dll which is where all of the IOD (information Object Definition) tables are located. Without these lookup tables lead tools simply has no idea what class of file it is looking at. So I added a reference to this file and, hey presto now when I loaded my Dicom file into the dataset the InformationClass property now correctly indicated that we were indeed looking at a CTImage type of dataset. With this InformationClass set subsequent calls to InsertModule method now started to work correctly, at least… they work if the ModuleType is a valid module for the InformationClass you are viewing.

I hope this helps you

Advertisements