- There is only one library built in NetStandard 2.0 fo-dicom.core.*
- Use
Microsoft.Extensions.DependencyInjection
. There is an extension method toIServiceCollection.AddDefaultDicomServices()
to add all default implementations for the required interfaces.- IFileReferenceFactory: creates a
IFileReference
instance. Is used internally whenever a Reference to a file is created. - IImageManager: creates a
IImage
instance. Default isRawImageManager
, that returns a byte array. callIServiceCollection.UseImageManager<MyImageManager>()
to register an other implementation. - ITranscoderManager: manages the codecs, used by
DicomTranscoder
. CallIServiceCollection.useTranscoderManager<MyTranscoderManager>()
to register an other implementation. - ILogManager: creates a concrete implementation of
ILogger
. - INetworkManager: creates a listner, opens streams or checks connection status.
- IDicomClientFactory: is responsible to return an
IDicomClient
instance. This may be a new instance everytime or a reused instance per host or whateever. - IDicomServerFactory: creates server instances, manages available ports, etc.
- IFileReferenceFactory: creates a
- If there is no DI container provided, fo-dicom creates its own internally. To configure it, call
new DicomSetupBuilder().RegisterServices(s => ...).Build();
There are extension methods for this DicomSetupBuilder like.SkipValidation()
orSetDicomServiceLogging(logDataPdus, log DimseDataset)
. The new interfaceIServiceProviderHost
manages, if there is an internal ServiceProvider or if to use a given Asp.Net Service Provider. - DicomServer uses DI to create the instances of your
DicomService
. You can use constructor injection there. - Make server providers asynchronous
- A new class
DicomClientOptions
holds all the options of a DicomClient to be passed instead of the huge list of parameters. DicomServerRegistration
manages the started servers per IP/Port.- Some little memory consumption emprovements in IByteBuffer classes.
- new methods in
IByteBuffer
to directly manipulate/use the data instead of copying it around multiple times. - Include Json serialization/deserialization directly into fo-dicom.core based on
System.Text.Json
. - Text encoding is now handled when a string is written into a network- or file-stream.
- Switch to IAsyncEnumerator on netstandard2.1, netcoreapp3.X
- internal: SCU now sends two presentation context per CStoreRequest: one with the original TS and one with the additional and the mandatory ImplicitLittleEndian. So the chance is higher to send the file without conversion. (#1048)
- namespace changed from
Dicom
toFellowOakDicom
IOManager
is removed. Instead of callingIOManager.CreateFileReference(path)
now directly create a new instancenew Filereference(path)
. The same is true forDirecotryReference
.- In general: all *Manager classes with their static
.SetImplementation
initializers have been replaced by Dependency Injection. - By default there is only
RawImageManager
implementation forIImageManager
. To haveWinFormsImageManager
orWPFImageManager
you have to reference the package fo-dicom.Imaging.Desktop. To useImageSharpImageManager
you have to reference fo-dicom.Imaging.ImageSharp. - There are only asynchronous server provider interfaces. All synchronous methods have been replaced by asynchronous.
- Instances of
DicomClient
andDicomServer
are not created directly, but via aDicomClientFactory
or aDicomServerFactory
. If you are in a "DI-Environment" like Asp.Net, then inject aIDicomClientFactory
instance and use this to create a DicomClient. otherwise callDicomClientFactory.CreateDicomClient(...)
. This is a wrapper around accessing the internal DI container , getting the registered IDicomClientFactory and then calling this. So this is more overhead. - Classes
DicomFileReader
,DicomReader
,DicomReaderCallbackObserver
etc are now internal instead of public, because the resulting Datasets are wrong/inconsistent and need further changes. Therefore its usage is dangerous for users. (#823) - Removed obsolte methods/classes/properties
DicomValidation.AutoValidation
: CallDicomSetupBuilder.SkipValidation()
instead.Dicom.Network.DicomClient
: useFellowOakDicom.Network.Client.DicomClient
instead.Dicom.Network.IDicomServiceUser
: useIDicomClientConnection
instead.ChangeTransferSyntax(..)
extension methods forDicomFile
andDicomDataset
: use the methodClone(..)
instead.DicomDataset.Get<T>
: useGetValue
,GetValues
,GetSingleValue
orGetSequence
instead.DicomDataset.AddOrUpdatePixelData
: useDicomPixelData.AddFrame(IByteBuffer)
to add pixel data to underlying dataset.DicomUID.Generate(name)
: useDicomUID.Generate()
instead.DicomUID.IsValid(uid)
: useDicomUID.IsValidUid(uid)
instead.DicomUIDGenerator.Generate()
andDicomUIDGenerator.GenerateNew()
: useDicomUIDGenerator.GenerateDerivedFromUUID()
DicomImage.Dataset
,DicomImage.PixelData
andDicomImage.PhotometricInterpretation
: do not load the DicomImage directly from filename if you also need access to the dataset, but load the DicomDataset from file first and then construct the DicomImage from this loaded DicomDataset. Then you can access both.
- DicomStringElement and derived classes do not have the "encoding" parameter in constructor, that takes a string-value
- DicomDataset.Add(OrUpdate) does not take an "encoding" parameter any more, instead the DicomDataset has a property
TextEncoding
, that is applied to all string-based tags.