How to make Rad69 request without using DicomObjects

In XdsObjects, we have made a new method for retrieving Imaging Document sets without the dependency to DicomObjects.

And here is the C# sample code to show you how to make a Rad69 request without using DicomObjects:

            string RepositoryOID = "1.2.3.4";
            string StudyUID = "1.2.3.4.5.1";
            string SeriesUID = "1.2.3.4.5.2";
            string InstanceUID = "1.2.3.4.5.3";
            string AET = "";  // not necessary if the KOS uses OIDs
 
            XdsImagingClient client = new XdsImagingClient();
            
            // you would set up one of these for each possible endpoint
            client.AddWebServiceEndpoint(AET, RepositoryOID, endPointAddress, XdsImagingClient.RetrievalMethod.Rad69, null);

            
            // bottom up
            DicomSeries series = new DicomSeries(SeriesUID);
            series.DocumentUniqueIds.Add(InstanceUID);  // could of course be multiple!

            DicomStudy study = new DicomStudy(StudyUID);
            study.Series.Add(series);  // could of course be multiple

            XdsImagingRetrieveRequest request = new XdsImagingRetrieveRequest();
            request.Studies.Add(study); // could of course be multiple

            request.RepositoryUniqueId = RepositoryOID;

            // specify acceptable transfer syntaxes
            request.TransferSyntaxes.Add("1.2.840.10008.1.2.4.57"); // JPEG lossless

            List<XdsDocument> results = client.RetrieveObjects(request);

            foreach (var result in results)
            {
                MemoryStream imagedata = new MemoryStream(result.Data); // or you could use the byte[] directly
                // do what you want with the data or stream

            }

Relevance: