private static void AddPresentationContexts(ServerAssociationParameters assoc) { byte pcid = assoc.AddPresentationContext(SopClass.ModalityWorklistInformationModelFind); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); }
private static void AddPresentationContexts(ServerAssociationParameters assoc) { byte pcid = assoc.AddPresentationContext(SopClass.VerificationSopClass); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.ModalityPerformedProcedureStepSopClass); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); }
private static void SetImageTransferSyntaxes(byte pcid, ServerAssociationParameters assoc) { if (JpegLossless) assoc.AddTransferSyntax(pcid,TransferSyntax.JpegLosslessNonHierarchicalFirstOrderPredictionProcess14SelectionValue1); if (Rle) assoc.AddTransferSyntax(pcid, TransferSyntax.RleLossless); if (J2KLossy) assoc.AddTransferSyntax(pcid, TransferSyntax.Jpeg2000ImageCompression); if (J2KLossless) assoc.AddTransferSyntax(pcid, TransferSyntax.Jpeg2000ImageCompressionLosslessOnly); if (JpegLossy) { assoc.AddTransferSyntax(pcid, TransferSyntax.JpegBaselineProcess1); assoc.AddTransferSyntax(pcid, TransferSyntax.JpegExtendedProcess24); } assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); }
public void ScuAbortTest() { int port = 2112; /* Setup the Server */ ServerAssociationParameters serverParameters = new ServerAssociationParameters("AssocTestServer", new IPEndPoint(IPAddress.Any, port)); byte pcid = serverParameters.AddPresentationContext(SopClass.MrImageStorage); serverParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); serverParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrBigEndian); serverParameters.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); _serverType = TestTypes.Receive; DicomServer.StartListening(serverParameters, ServerHandlerCreator); StorageScu scu = SetupScu(); IList<DicomAttributeCollection> list = SetupMRSeries(4, 2, DicomUid.GenerateUid().UID); foreach (DicomAttributeCollection collection in list) { DicomFile file = new DicomFile("test",new DicomAttributeCollection(),collection ); file.TransferSyntax = TransferSyntax.ExplicitVrLittleEndian; file.MediaStorageSopClassUid = SopClass.MrImageStorage.Uid; file.MediaStorageSopInstanceUid = collection[DicomTags.SopInstanceUid].ToString(); scu.AddStorageInstance(new StorageInstance(file)); } scu.ImageStoreCompleted += delegate(object o, StorageInstance instance) { // Test abort scu.Abort(); }; scu.Send(); scu.Join(); Assert.AreEqual(scu.Status, ScuOperationStatus.NetworkError); // StopListening DicomServer.StopListening(serverParameters); }
public void StorageScuFromDisk() { int port = 2112; _serverHandlerList.Clear(); /* Setup the Server */ var serverParameters = new ServerAssociationParameters("AssocTestServer", new IPEndPoint(IPAddress.Any, port)); byte pcid = serverParameters.AddPresentationContext(SopClass.MrImageStorage); serverParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); serverParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrBigEndian); serverParameters.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); _serverType = TestTypes.Receive; DicomServer.StartListening(serverParameters, ServerHandlerCreator); StorageScu scu = SetupScu(); IList<DicomAttributeCollection> list = SetupMRSeries(4, 2, DicomUid.GenerateUid().UID); foreach (DicomAttributeCollection collection in list) { var file = new DicomFile("test", new DicomAttributeCollection(), collection) { TransferSyntax = TransferSyntax.ExplicitVrLittleEndian, MediaStorageSopClassUid = SopClass.MrImageStorage.Uid, MediaStorageSopInstanceUid = collection[DicomTags.SopInstanceUid].ToString() }; string instancePath = file.MediaStorageSopInstanceUid + ".dcm"; file.Save(instancePath); var instance = new StorageInstance(instancePath) { SopClass = file.SopClass, TransferSyntax = file.TransferSyntax, SopInstanceUid = file.MediaStorageSopClassUid, PatientId = file.DataSet[DicomTags.PatientId].GetString(0, string.Empty), PatientsName = file.DataSet[DicomTags.PatientsName].GetString(0, string.Empty), StudyInstanceUid = file.DataSet[DicomTags.StudyInstanceUid].GetString(0, string.Empty) }; scu.AddStorageInstance(instance); } scu.Send(); scu.Join(); Assert.AreEqual(scu.Status, ScuOperationStatus.NotRunning); var handler = CollectionUtils.FirstElement(_serverHandlerList); var serverHandler = handler as ServerHandler; Assert.NotNull(serverHandler); foreach (var message in serverHandler.MessagesReceived) { foreach (var file in list) { if (message.AffectedSopInstanceUid.Equals(file[DicomTags.SopInstanceUid].ToString())) { Assert.IsTrue(message.DataSet.Equals(file)); } } } // StopListening DicomServer.StopListening(serverParameters); }
public void StorageScuMoveOriginatorTest() { int port = 2112; _serverHandlerList.Clear(); /* Setup the Server */ var serverParameters = new ServerAssociationParameters("AssocTestServer", new IPEndPoint(IPAddress.Any, port)); byte pcid = serverParameters.AddPresentationContext(SopClass.MrImageStorage); serverParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); serverParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrBigEndian); serverParameters.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); _serverType = TestTypes.Receive; DicomServer.StartListening(serverParameters, ServerHandlerCreator); string moveOriginatorAe = "ORIGINATOR"; ushort moveOriginatorId = 999; StorageScu scu = SetupScu(moveOriginatorAe, moveOriginatorId); IList<DicomAttributeCollection> list = SetupMRSeries(4, 2, DicomUid.GenerateUid().UID); foreach (DicomAttributeCollection collection in list) { var file = new DicomFile("test", new DicomAttributeCollection(), collection) { TransferSyntax = TransferSyntax.ExplicitVrLittleEndian, MediaStorageSopClassUid = SopClass.MrImageStorage.Uid, MediaStorageSopInstanceUid = collection[DicomTags.SopInstanceUid].ToString() }; scu.AddStorageInstance(new StorageInstance(file)); } scu.Send(); scu.Join(); Assert.AreEqual(scu.Status, ScuOperationStatus.NotRunning); var handler = CollectionUtils.FirstElement(_serverHandlerList); var serverHandler = handler as ServerHandler; Assert.NotNull(serverHandler); foreach (var message in serverHandler.MessagesReceived) { Assert.AreEqual(message.MoveOriginatorApplicationEntityTitle, moveOriginatorAe); Assert.AreEqual(message.MoveOriginatorMessageId, moveOriginatorId); } // StopListening DicomServer.StopListening(serverParameters); }
public void ServerTest() { int port = 2112; /* Setup the Server */ ServerAssociationParameters serverParameters = new ServerAssociationParameters("AssocTestServer",new IPEndPoint(IPAddress.Any,port)); byte pcid = serverParameters.AddPresentationContext(SopClass.MrImageStorage); serverParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); serverParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrBigEndian); serverParameters.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); _serverType = TestTypes.SendMR; DicomServer.StartListening(serverParameters, ServerHandlerCreator); /* Setup the client */ ClientAssociationParameters clientParameters = new ClientAssociationParameters("AssocTestClient","AssocTestServer", new System.Net.IPEndPoint(IPAddress.Loopback,port)); pcid = clientParameters.AddPresentationContext(SopClass.MrImageStorage); clientParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); clientParameters.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = clientParameters.AddPresentationContext(SopClass.CtImageStorage); clientParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); clientParameters.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); /* Open the association */ ClientHandler handler = new ClientHandler(this,TestTypes.SendMR); DicomClient client = DicomClient.Connect(clientParameters, handler); handler._threadStop.WaitOne(); client.Dispose(); DicomServer.StopListening(serverParameters); }
public void RejectTests() { const int port = 2112; /* Setup the Server */ var serverParameters = new ServerAssociationParameters("AssocTestServer", new IPEndPoint(IPAddress.Any, port)); byte pcid = serverParameters.AddPresentationContext(SopClass.MrImageStorage); serverParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); serverParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrBigEndian); serverParameters.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); _serverType = TestTypes.AssociationReject; DicomServer.StartListening(serverParameters, ServerHandlerCreator); /* Setup the client */ var clientParameters = new ClientAssociationParameters("AssocTestClient", "AssocTestServer", new IPEndPoint(IPAddress.Loopback, port)); pcid = clientParameters.AddPresentationContext(SopClass.CtImageStorage); clientParameters.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); clientParameters.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); /* Open the association */ var handler = new ClientHandler(this, TestTypes.AssociationReject); DicomClient client = DicomClient.Connect(clientParameters, handler); handler._threadStop.WaitOne(); client.Dispose(); _serverType = TestTypes.AssociationReject; /* Setup the client */ clientParameters = new ClientAssociationParameters("AssocTestClient", "AssocTestServer", new IPEndPoint(IPAddress.Loopback, port)); pcid = clientParameters.AddPresentationContext(SopClass.MrImageStorage); clientParameters.AddTransferSyntax(pcid, TransferSyntax.Jpeg2000ImageCompressionLosslessOnly); /* Open the association */ var clientHandler = new ClientHandler(this, TestTypes.AssociationReject); client = DicomClient.Connect(clientParameters, clientHandler); handler._threadStop.WaitOne(); client.Dispose(); DicomServer.StopListening(serverParameters); }
private static void AddPresentationContexts(ServerAssociationParameters assoc) { byte pcid = assoc.AddPresentationContext(SopClass.VerificationSopClass); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.MrImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.CtImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.SecondaryCaptureImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.UltrasoundImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.UltrasoundImageStorageRetired); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.UltrasoundMultiFrameImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.UltrasoundMultiFrameImageStorageRetired); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.NuclearMedicineImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.DigitalIntraOralXRayImageStorageForPresentation); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.DigitalIntraOralXRayImageStorageForProcessing); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.DigitalMammographyXRayImageStorageForPresentation); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.DigitalMammographyXRayImageStorageForProcessing); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.DigitalXRayImageStorageForPresentation); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.DigitalXRayImageStorageForProcessing); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.ComputedRadiographyImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.GrayscaleSoftcopyPresentationStateStorageSopClass); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.KeyObjectSelectionDocumentStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.OphthalmicPhotography16BitImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.OphthalmicPhotography8BitImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.VideoEndoscopicImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.VideoMicroscopicImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.VideoPhotographicImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.VlEndoscopicImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.VlMicroscopicImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.VlPhotographicImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.VlSlideCoordinatesMicroscopicImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.XRayAngiographicBiPlaneImageStorageRetired); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.XRayAngiographicImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.XRayRadiofluoroscopicImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.XRayRadiationDoseSrStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.ChestCadSrStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.XRay3dAngiographicImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.XRay3dCraniofacialImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.EncapsulatedCdaStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.OphthalmicTomographyImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); }
private void _startStop_Click(object sender, EventArgs e) { if (_parms == null) { _parms = new ServerAssociationParameters("TEST", new IPEndPoint(IPAddress.Loopback, 105)); _parms.AddPresentationContext(1, SopClass.VerificationSopClass); _parms.AddTransferSyntax(1, TransferSyntax.ExplicitVrLittleEndian); _parms.AddTransferSyntax(1, TransferSyntax.ImplicitVrLittleEndian); _parms.AddPresentationContext(2, SopClass.StudyRootQueryRetrieveInformationModelMove); _parms.AddTransferSyntax(2, TransferSyntax.ExplicitVrLittleEndian); _parms.AddTransferSyntax(2, TransferSyntax.ImplicitVrLittleEndian); _parms.AddPresentationContext(3, SopClass.StudyRootQueryRetrieveInformationModelFind); _parms.AddTransferSyntax(3, TransferSyntax.ExplicitVrLittleEndian); _parms.AddTransferSyntax(3, TransferSyntax.ImplicitVrLittleEndian); DicomServer.StartListening(_parms, StartAssociation); _startStop.Text = "Stop Listening"; } else { DicomServer.StopListening(_parms); _parms = null; _startStop.Text = "Stop Listening"; } }
private static void AddPresentationContexts(ServerAssociationParameters assoc) { byte pcid = assoc.AddPresentationContext(SopClass.VerificationSopClass); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.GrayscaleSoftcopyPresentationStateStorageSopClass); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.KeyObjectSelectionDocumentStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.ComprehensiveSrStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.BlendingSoftcopyPresentationStateStorageSopClass); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.ColonCadSrStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.DeformableSpatialRegistrationStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.EnhancedSrStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.BasicTextSrStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.EncapsulatedPdfStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.XRayRadiationDoseSrStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.ChestCadSrStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.EncapsulatedCdaStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.RtBeamsDeliveryInstructionStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.RtBeamsTreatmentRecordStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.RtBrachyTreatmentRecordStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.RtDoseStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.RtImageStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.RtIonBeamsTreatmentRecordStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.RtIonPlanStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.RtPlanStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.RtStructureSetStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.RtTreatmentSummaryRecordStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.MammographyCadSrStorage); assoc.AddTransferSyntax(pcid, TransferSyntax.ExplicitVrLittleEndian); assoc.AddTransferSyntax(pcid, TransferSyntax.ImplicitVrLittleEndian); pcid = assoc.AddPresentationContext(SopClass.MrImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.CtImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.SecondaryCaptureImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.UltrasoundImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.UltrasoundImageStorageRetired); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.UltrasoundMultiFrameImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.UltrasoundMultiFrameImageStorageRetired); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.NuclearMedicineImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.DigitalIntraOralXRayImageStorageForPresentation); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.DigitalIntraOralXRayImageStorageForProcessing); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.DigitalMammographyXRayImageStorageForPresentation); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.DigitalMammographyXRayImageStorageForProcessing); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.DigitalXRayImageStorageForPresentation); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.DigitalXRayImageStorageForProcessing); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.ComputedRadiographyImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.OphthalmicPhotography16BitImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.OphthalmicPhotography8BitImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.VideoEndoscopicImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.VideoMicroscopicImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.VideoPhotographicImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.VlEndoscopicImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.VlMicroscopicImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.VlPhotographicImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.VlSlideCoordinatesMicroscopicImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.XRayAngiographicBiPlaneImageStorageRetired); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.XRayAngiographicImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.XRayRadiofluoroscopicImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.XRay3dAngiographicImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.XRay3dCraniofacialImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.OphthalmicTomographyImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.EnhancedCtImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.EnhancedMrColorImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.EnhancedMrImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.EnhancedPetImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.BreastTomosynthesisImageStorage); SetImageTransferSyntaxes(pcid, assoc); pcid = assoc.AddPresentationContext(SopClass.EnhancedUsVolumeStorage); SetImageTransferSyntaxes(pcid, assoc); }