Beispiel #1
0
        public void EditorTest()
        {
            Process pacs = new Process();

            pacs.StartInfo.FileName = Tools.RootFolder + @"\EK\Capture\Dicom\Tools\DicomEditor\bin\Debug\DicomEditor.exe";

            ApplicationEntity editor  = new ApplicationEntity("DICOMEDITOR", IPAddress.Parse("127.0.0.1"), 2009);
            ApplicationEntity console = new ApplicationEntity("CONSOLE", IPAddress.Parse("127.0.0.1"), 2010);

            try
            {
                pacs.Start();
                StorageTest.Start(console);
            }
            catch
            {
                pacs.StartInfo.FileName = Tools.RootFolder + @"\EK\Capture\Dicom\Tools\DicomEditor\bin\Debug\DicomEditor.exe";
                pacs.Start();
            }
            Thread.Sleep(1000);

            StorageTest.store(@"EK\Capture\Dicom\DicomToolKit\Test\Data\DicomDir\THGLUZ5J.dcm", editor, true);

            System.Windows.Forms.MessageBox.Show("Click OK to stop Server.");

            StorageTest.Stop();

            pacs.Kill();
        }
Beispiel #2
0
        public void InternalCMoveTest()
        {
            // make sure DICOM at "." is empty
            DicomDir dir = new DicomDir(".");

            dir.Empty();

            ApplicationEntity storage = new ApplicationEntity("ImageServer", IPAddress.Parse("127.0.0.1"), 2000);
            ApplicationEntity server  = new ApplicationEntity("ImageServer", IPAddress.Parse("127.0.0.1"), 5104);

            Dictionary <string, ApplicationEntity> stations = new Dictionary <string, ApplicationEntity>();

            stations.Add(storage.Title, storage);

            StorageTest.Start(storage);
            CMoveTest.Start(server, stations);

            // add three images to a DICOMDIR at "."
            StorageTest.store(@"EK\Capture\Dicom\DicomToolKit\Test\Data\DicomDir\Y2ASNFDS.dcm", storage, false);
            StorageTest.store(@"EK\Capture\Dicom\DicomToolKit\Test\Data\DicomDir\WNGVU1P1.dcm", storage, false);
            StorageTest.store(@"EK\Capture\Dicom\DicomToolKit\Test\Data\DicomDir\THGLUZ5J.dcm", storage, false);

            // ask for an image from a DICOMDIR at "." be delivered to a DICOMDIR at "."
            // should create a duplicate SOPInstanceUID, which results in a WARNING
            try
            {
                move(storage.Title, server);
            }
            catch (Exception)
            {
            }

            CMoveTest.Stop();
            StorageTest.Stop();
        }
Beispiel #3
0
        public void ServerTest()
        {
            ApplicationEntity host = new ApplicationEntity("ROCD4CZ14307CW", 5040);

            StorageTest.Start(host);

            System.Windows.Forms.MessageBox.Show("Click OK to stop Server.");

            StorageTest.Stop();
        }
Beispiel #4
0
        public void InternalQueryTest2()
        {
            DicomDir dir = new DicomDir(".");

            dir.Empty();

            ApplicationEntity storage = new ApplicationEntity("ImageServer", IPAddress.Parse("127.0.0.1"), 2000);

            StorageTest.Start(storage);

            StorageTest.store(@"EK\Capture\Dicom\DicomToolKit\Test\Data\DicomDir\Y2ASNFDS.dcm", storage, false);
            StorageTest.store(@"EK\Capture\Dicom\DicomToolKit\Test\Data\DicomDir\WNGVU1P1.dcm", storage, false);
            StorageTest.store(@"EK\Capture\Dicom\DicomToolKit\Test\Data\DicomDir\THGLUZ5J.dcm", storage, false);

            StorageTest.Stop();

            ApplicationEntity host = new ApplicationEntity("IMAGESERVER", 2190);

            CFindTest.Start(host);

            CFindServiceSCU find = new CFindServiceSCU(SOPClass.StudyRootQueryRetrieveInformationModelFIND);

            find.Syntaxes.Add(Syntax.ExplicitVrLittleEndian);

            Association association = new Association();

            association.AddService(find);

            if (association.Open(host.Title, host.Address, host.Port))
            {
                Series series = new Series();
                series[t.StudyInstanceUID].Value = "1.2.840.113564.109517115.2009111711190101521";

                DataSet filter = new DataSet();
                filter.Elements = series.Elements;

                filter.Set(t.QueryRetrieveLevel, "SERIES");

                RecordCollection records = find.CFind(filter);
                RecordCollectionTest.WriteRecords(records);
            }
            else
            {
                System.Console.WriteLine("\ncan't Open.");
            }
            association.Close();
            dir.Empty();

            CFindTest.Stop();
        }
Beispiel #5
0
        public void StorageCommitTest()
        {
            ApplicationEntity editor  = new ApplicationEntity("DICOMEDITOR", IPAddress.Parse("127.0.0.1"), 2009);
            ApplicationEntity console = new ApplicationEntity("CONSOLE", IPAddress.Parse("127.0.0.1"), 5040);

            StorageTest.Start(console);

            Thread.Sleep(1000);

            StorageTest.store(@"EK\Capture\Dicom\DicomToolKit\Test\Data\DicomDir\THGLUZ5J.dcm", editor, true);

            System.Windows.Forms.MessageBox.Show("Click OK to stop Server.");

            StorageTest.Stop();
        }