/// <summary> /// Scan the files to send, and create presentation contexts for each abstract syntax to send. /// </summary> protected override void SetPresentationContexts() { byte pcid = AssociationParameters.FindAbstractSyntax(MoveSopClass); if (pcid == 0) { pcid = AssociationParameters.AddPresentationContext(MoveSopClass); AssociationParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); AssociationParameters.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); } }
/// <summary> /// Adds the sop class to presentation context for Explicit and Implicit Vr Little Endian /// </summary> /// <param name="sopClass">The sop class.</param> /// <exception cref="DicomException"/> /// <exception cref="ArgumentNullException"/> protected void AddSopClassToPresentationContext(SopClass sopClass) { if (sopClass == null) { throw new ArgumentNullException("sopClass"); } byte pcid = AssociationParameters.FindAbstractSyntax(sopClass); if (pcid == 0) { pcid = AssociationParameters.AddPresentationContext(sopClass); AssociationParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); AssociationParameters.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); } else { throw new DicomException("Cannot find SopClass in association parameters: " + sopClass); } }