how i can download dcm images from pacs and save?

149 views
Skip to first unread message

Arthur Brian Gil Paredes

unread,
Jun 1, 2017, 6:48:36 PM6/1/17
to Fellow Oak DICOM

i'm trying download dcm image from pacs server, but this generate a empty dcm file

plese Help me :(


public VisoresPacsController(string ipAddress, string aeTitle, string accessId, int port)
    {
        /* this.ipAddress = ipAddress;
         this.aeTitle = aeTitle;
         this.accessId = accessId;
         this.port = port;

         visores.Add(new VisorCommandLine("Radiant", ""));
         ///new DicomCStoreRequest.*/
        DicomClient client = new DicomClient();
        var query = DicomCFindRequest.CreateImageQuery("1.2.250.1.31.2.723.19980722.113224.11597", "1.2.250.1.31.3.723.19980722.113224.11597");
        client.AddRequest(query);
        query.OnResponseReceived = onResponse;
        client.Send("70.38.12.40", 4242, false, "THS", "ORTHANC");
    }

    public void onResponse(DicomCFindRequest req, DicomCFindResponse res)
    {
        DicomDataset dataset = res.Dataset;
        dataset.Add(DicomTag.SOPClassUID, "1.2.250.1.31.4.723.19980722.113224.11597");
        //dataset.Add(DicomTag.StudyInstanceUID, GenerateUid());
        //dataset.Add(DicomTag.SeriesInstanceUID, GenerateUid());
        //dataset.Add(DicomTag.SOPInstanceUID, GenerateUid());
        DicomFile dicomFile = new DicomFile(dataset);
        dicomFile.Save(@"C:\Users\Developer 13\Desktop\dicomfile.dcm");
    }



Jordan

unread,
Jun 2, 2017, 2:41:59 AM6/2/17
to Fellow Oak DICOM
Hi,

May be you need to use Worklist, I'm not sure you can get dicom file from a server without worklist...

Jordan,

Anders Gustafsson Cureos AB

unread,
Jun 2, 2017, 3:18:01 AM6/2/17
to Fellow Oak DICOM
Hi Arthur,

noticed you had published the question on StackOverflow as well. Please have a look there for further information, I see you already have two answers :-)

Regards
Anders @ Cureos
Reply all
Reply to author
Forward
0 new messages