DicomObjects performance when running in background thread

To improve the performance of DicomObjects when running in background threads (instead of the main thread), setting the "ThreadModel" registry to "Apartment" greatly improves the speed. Versions of DicomObjects of the form 4.3.xxx.9x (the 9 indicates compilation with Visual Studio 2008 - aka VS9) create these keys automatically when registered automatically (whether using RegSvr32, or an installer etc.), but for older versions of DicomObjects, manual addition as below is necessary.

For your convenience, a complete list of registry keys has been included in the following section. Create a .Reg file, copy and paste the lines below, save the .Reg file and double click on it to make the change.

Windows Registry Editor Version 5.00

;DicomViewer
[HKEY_CLASSES_ROOT\CLSID\{853AAF97-E49C-11D0-A303-0040C711066C}\InprocServer32]
"ThreadingModel"="Apartment"

;DicomImages
[HKEY_CLASSES_ROOT\CLSID\{4659FC30-0533-11D1-A338-0040C711066C}\InProcServer32]
"ThreadingModel"="Apartment"

;DicomImage
[HKEY_CLASSES_ROOT\CLSID\{ACC4CE00-0528-11d1-A338-0040C711066C}\InProcServer32]
"ThreadingModel"="Apartment"

;DicomLabels
[HKEY_CLASSES_ROOT\CLSID\{FC53E7F7-A314-11D2-A46E-0040C711066C}\InProcServer32]
"ThreadingModel"="Apartment"

;DicomLabel
[HKEY_CLASSES_ROOT\CLSID\{FC53E7F4-A314-11D2-A46E-0040C711066C}\InprocServer32]
"ThreadingModel"="Apartment"

;DicomDataSets
[HKEY_CLASSES_ROOT\CLSID\{6A3FC8D5-0072-11D1-A331-0040C711066C}\InProcServer32]
"ThreadingModel"="Apartment"

;DicomDataSet
[HKEY_CLASSES_ROOT\CLSID\{6A3FC8D2-0072-11D1-A331-0040C711066C}\InProcServer32]
"ThreadingModel"="Apartment"

;DicomQuery
[HKEY_CLASSES_ROOT\CLSID\{704E4312-EA12-11D0-A30D-0040C711066C}\InProcServer32]
"ThreadingModel"="Apartment"

;DicomServer
[HKEY_CLASSES_ROOT\CLSID\{EA4AAAE5-3ABE-11D1-A395-0040C711066C}\InProcServer32]
"ThreadingModel"="Apartment"

;DicomConnection
[HKEY_CLASSES_ROOT\CLSID\{21C7DB43-43ED-11D1-A39D-0040C711066C}\InProcServer32]
"ThreadingModel"="Apartment"

;DicomConnections
[HKEY_CLASSES_ROOT\CLSID\{EB9DDD94-38C5-406F-A661-712DBE56866F}\InProcServer32]
"ThreadingModel"="Apartment"

;DicomLog
[HKEY_CLASSES_ROOT\CLSID\{BE3650DF-E240-4FB1-B4CF-A694587B97F8}\InprocServer32]
"ThreadingModel"="Apartment"

;DicomGlobal
[HKEY_CLASSES_ROOT\CLSID\{59B72879-1F28-4C03-9A0C-515EF48D616B}\InProcServer32]
"ThreadingModel"="Apartment"

;DicomPrint
[HKEY_CLASSES_ROOT\CLSID\{E65869D1-4CFF-41A6-A164-4D39D0D3CDEF}\InProcServer32]
"ThreadingModel"="Apartment"

Note
DicomAttribute, DicomAttributes, DicomContext and DicomContexts do not appear in this list since they cannot be created directly via the OLE creation mechanisms.

For detailed information about COM Threading Models, check the following Microsoft article:

http://support.microsoft.com/?scid=kb%3Ben-us%3B150777&x=4&y=20

Relevance: