- 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
IFileReferenceinstance. Is used internally whenever a Reference to a file is created. - IImageManager: creates a
IImageinstance. 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
IDicomClientinstance. 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 interfaceIServiceProviderHostmanages, 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
DicomClientOptionsholds all the options of a DicomClient to be passed instead of the huge list of parameters. DicomServerRegistrationmanages the started servers per IP/Port.- Some little memory consumption emprovements in IByteBuffer classes.
- new methods in
IByteBufferto 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
DicomtoFellowOakDicom IOManageris 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
.SetImplementationinitializers have been replaced by Dependency Injection. - By default there is only
RawImageManagerimplementation forIImageManager. To haveWinFormsImageManagerorWPFImageManageryou have to reference the package fo-dicom.Imaging.Desktop. To useImageSharpImageManageryou have to reference fo-dicom.Imaging.ImageSharp. - There are only asynchronous server provider interfaces. All synchronous methods have been replaced by asynchronous.
- Instances of
DicomClientandDicomServerare not created directly, but via aDicomClientFactoryor aDicomServerFactory. If you are in a "DI-Environment" like Asp.Net, then inject aIDicomClientFactoryinstance 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,DicomReaderCallbackObserveretc 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.DicomClientinstead.Dicom.Network.IDicomServiceUser: useIDicomClientConnectioninstead.ChangeTransferSyntax(..)extension methods forDicomFileandDicomDataset: use the methodClone(..)instead.DicomDataset.Get<T>: useGetValue,GetValues,GetSingleValueorGetSequenceinstead.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.PixelDataandDicomImage.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.