Exemple #1
0
 /// <summary>
 /// studies列表双击事件,触发获取Study相关所有Series下所有Image的操作!
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void listViewStudies_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (listViewStudies.SelectedItems.Count == 0)
     {
         return;
     }
     patientId     = listViewStudies.SelectedItems[0].SubItems[0].Text;
     studyInstance = listViewStudies.SelectedItems[0].Tag as string;
     if (!string.IsNullOrEmpty(studyInstance))
     {
         CFindQuery query = new CFindQuery();
         query.StudyInstanceUid = studyInstance;
         query.PatientID        = listViewStudies.SelectedItems[0].SubItems[0].Text;
         cfind.Find(server, FindType.StudySeries, query, AETitle);
     }
     //创建存放dcm文件的文件夹
     workPath = Application.StartupPath + "\\dicomfile\\" + studyInstance;
     //Cursor = Cursors.WaitCursor;
 }
Exemple #2
0
      private void listViewStudies_SelectedIndexChanged(object sender, System.EventArgs e)
      {
         if(listViewStudies.SelectedItems.Count == 0)
            return;

         DicomDataSet ds = listViewStudies.SelectedItems[0].Tag as DicomDataSet;

         string study = Utils.GetStringValue(ds, DemoDicomTags.StudyInstanceUID);

         ImageList.Items.Clear();
         _viewer.Image = null;
         if(study.Length > 0)
         {
            CFindQuery query = new CFindQuery();

            query.StudyInstanceUid = study;
            query.PatientID = Utils.GetStringValue(ds, DemoDicomTags.PatientID);
            EnableItems(false);
            cfind.Find(server, FindType.StudySeries, query, AETitle);
         }
      }
Exemple #3
0
        void SetValueCFind()
        {
            try
            {
                dcmQuery = new CFindQuery();
                string PCode = txtSearchPCode.Text.Trim() == "" ? "NOTHING" : txtSearchPCode.Text.Trim();
                string PName = txtSearchPName.Text.Trim() == "" ? "NOTHING" : txtSearchPName.Text.Trim();
                Int16 pSex = Convert.ToInt16(cboSearchSex.SelectedIndex);
                if (pSex <= 0) pSex = 100;

                Int64 RegNumber = txtRegID.Text.Trim() == "" ? -1 : Convert.ToInt64(txtRegID.Text.Trim());
                string RegFrom = lblFromDate.IsChecked ? dtpFromDate.Text : "1/1/1900";
                string RegTo = lblFromDate.IsChecked ? dtpToDate.Text : "1/1/1900";

                if (PName != "NOTHING") dcmQuery.PatientName = PName;
                if (PCode != "NOTHING") dcmQuery.PatientID = PCode;

                if (RegFrom != "1/1/1900")
                    dcmQuery.StudyStartDate = dtpFromDate.Value;
                if (RegTo != "1/1/1900")
                    dcmQuery.StudyEndDate = dtpToDate.Value;
                if (RegNumber != -1)
                    dcmQuery.AccessionNo = txtRegID.Text.Trim();
            }
            catch
            {
            }


        }
Exemple #4
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            CFindQuery dcmQuery = new CFindQuery();

            cfind.Find(server, FindType.Study, dcmQuery, AETitle);
        }
Exemple #5
0
        /*
         * When this page is made active, add the global MWL tree view and add or remove the AfterSelect
         *   event
         */
        private void Page3_VisibleChanged(object sender, EventArgs e)
        {
            try
            {
                if (Visible)
                {
                    EnableControls(true);

                    // Display the global results tree view
                    panelTreeView.Controls.Add(_globals.m_TreeResult);

                    // Add needed events from the tree
                    _globals.m_TreeResult.AfterSelect += new TreeViewEventHandler(m_TreeResult_AfterSelect);

                    // Build the query based on user data from Page 2
                    txtQuery.Text = "";
                    dcmQuery      = new CFindQuery();
                    if (_globals.m_nQueryType == 1) // Broad
                    {
                        txtQuery.Text += "Broad Modality Work List Query\r\n";
                        if (_globals.m_bCheckScheduledDate)
                        {
                            dcmQuery.ScheduledDate = _globals.m_ScheduledDate;
                            txtQuery.Text         += "\tScheduled Procedure Step Start Date: " + _globals.m_ScheduledDate + "\r\n";
                        }
                        else
                        {
                            txtQuery.Text += "\tScheduled Procedure Step Start Date:\r\n";
                        }

                        if (_globals.m_bCheckModality)
                        {
                            dcmQuery.Modality = _globals.m_strModality;
                            txtQuery.Text    += "\tModality: " + _globals.m_strModality;
                        }
                        else
                        {
                            txtQuery.Text += "\tModality:";
                        }
                    }
                    else // Patient
                    {
                        txtQuery.Text                += "Patient Based Query\r\n";
                        txtQuery.Text                += "\tPatient Name: " + _globals.m_strPatientName + "\r\n";
                        dcmQuery.PatientName          = _globals.m_strPatientName;
                        txtQuery.Text                += "\tPatient ID: " + _globals.m_strPatientID + "\r\n";
                        dcmQuery.PatientID            = _globals.m_strPatientID;
                        txtQuery.Text                += "\tAccession Number: " + _globals.m_strAccessionNumber + "\r\n";
                        dcmQuery.AccessionNo          = _globals.m_strAccessionNumber;
                        txtQuery.Text                += "\tRequested Procedure ID: " + _globals.m_strRequestedProcedureID;
                        dcmQuery.RequestedProcedureID = _globals.m_strRequestedProcedureID;
                    }
                }
                else
                {
                    // Remove events from the tree since we're not using this page anymore
                    _globals.m_TreeResult.AfterSelect -= m_TreeResult_AfterSelect;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }