예제 #1
0
        static void Main(string[] args)
        {
            var    process   = Process.GetCurrentProcess();
            string fullPath  = Path.GetDirectoryName(process.MainModule.FileName);
            var    me        = Entity.CreateLocal("DCMGRBC", 51167);
            var    scu       = new DICOMSCU(me);
            var    path      = fullPath + @"\temp\";
            var    scpEntity = Entity.CreateLocal("DCMGRB2", 50401);
            var    scp       = new FileWriterSCP(scpEntity, path);

            scp.SupportedAbstractSyntaxes = AbstractSyntax.ALL_RADIOTHERAPY_STORAGE;
            scp.ListenForIncomingAssociations(true);
            var logger = new ConsoleLogger(scp.Logger, ConsoleColor.White);

            try
            {
                using (var app = vapi.Application.CreateApplication(null, null))
                {
                    Execute(app, daemon, scu, scp, path);
                }
            }
            catch (Exception e)
            {
                System.Windows.Forms.MessageBox.Show(e.ToString(), "Error", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
            }
        }
예제 #2
0
        public SelectPlanUI(VMS.TPS.Common.Model.API.Application app, Entity daemon, DICOMSCU scu, FileWriterSCP scp, string path)
        {
            this.app      = app;
            this.daemon   = daemon;
            this.scu      = scu;
            this.scp      = scp;
            this.path     = path;
            this.Location = new Point(0, 0);

            InitializeComponent();

            //textBoxPatId.Text = "QC_Checklista";
        }
예제 #3
0
        public DICOMhandler(string id, string planUID, string doseUID, string tempPath, Entity daemon, DICOMSCU puller, FileWriterSCP catcher, double alphaBeta, double dosePerFraction, int nFractions)
        {
            this.id              = id;
            this.planUID         = planUID;
            this.doseUID         = doseUID;
            this.alphaBeta       = alphaBeta;
            this.dosePerFraction = dosePerFraction;
            this.tempPath        = tempPath;
            this.nFractions      = nFractions;

            this.daemon  = daemon;
            this.puller  = puller;
            this.catcher = catcher;


            this.qb = new QueryBuilder(puller, daemon);
        }
예제 #4
0
        public EQD2Control(User currentUser, Patient pat, PlanSetup plan, Entity daemon, DICOMSCU scu, FileWriterSCP scp, string tempPath)
        {
            this.tempPath        = tempPath;
            this.currentUser     = currentUser;
            this.patient         = pat;
            this.plan            = plan;
            this.daemon          = daemon;
            this.scu             = scu;
            this.scp             = scp;
            this.totalDose       = Convert.ToDouble(plan.TotalPrescribedDose.ValueAsString);
            this.dosePerFraction = plan.UniqueFractionation.PrescribedDosePerFraction.Dose;
            this.nFractions      = (int)plan.UniqueFractionation.NumberOfFractions;
            this.planUID         = plan.UID;
            this.doseUID         = plan.Dose.UID;

            InitializeComponent();

            // place info
            textBoxPat.Text           = patient.ToString();
            textBoxPlan.Text          = plan.ToString();
            textBoxFractionation.Text = plan.UniqueFractionation.PrescribedDosePerFraction.ToString() + " × " + this.nFractions + " = " + plan.TotalPrescribedDose.ToString();
            textBox1.Text             = alphaBeta.ToString();
        }
예제 #5
0
        static void Execute(vapi.Application app, Entity daemon, DICOMSCU scu, FileWriterSCP scp, string path)
        {
            SelectPlanUI selectPlanUI = new SelectPlanUI(app, daemon, scu, scp, path);

            selectPlanUI.ShowDialog();
        }