Efferent-Health / fo-dicom.Codecs

Cross-platform Dicom native codecs for fo-dicom
Other
64 stars 22 forks source link

using System.ComponentModel.Composition? #44

Closed amoerie closed 1 year ago

amoerie commented 1 year ago

Hi guys

I think you no longer need this reference. This was used in the old fo-dicom codecs as well and is used to explicitly export types so they can be picked by the TranscoderManager. But you're already using a simple reflection based approach there anyways, so unless I'm mistaken (always possible!) I think you can simply remove this and the corresponding [Export] attributes. :-)

Edit: here you can find the original transcoder manager that used System.ComponentModel.Composition to find the codecs:

https://github.com/fo-dicom/fo-dicom/blob/4.0/DICOM/Imaging/Codec/DesktopTranscoderManager.cs

jaime-olivares commented 1 year ago

Thanks, we will review that

jaime-olivares commented 1 year ago

At first glance, it seems you are totally right. We have updated the source code. We still need to perform all the tests.

cbeltran1306 commented 1 year ago

Hi @amoerie, this improvement has been included into the new published nuget 5.10.6. Thank you for your suggestion 👍