Exemplo n.º 1
0
        public DicomFile[] OpenDicomSearch()
        {
            OpenFileDialog openFile = new OpenFileDialog();

            try
            {
                openFile.InitialDirectory = "c:\\";
                openFile.Filter           = "Dicom Files (*.dcm)|*.dcm";
                openFile.FilterIndex      = 1;
                openFile.RestoreDirectory = true;
                openFile.Multiselect      = true;

                if (openFile.ShowDialog() == true)
                {
                    DicomFile[] dcm = new DicomFile[openFile.FileNames.Length];

                    foreach (string uri in openFile.FileNames)
                    {
                        Console.WriteLine("Reading from " + uri);
                        dcm[Array.IndexOf(dcm, null)] = DicomFile.Open(uri);
                    }
                    WriteableBitmap bitmap = DisplayManagement.DICOMToBmp(dcm[0]);
                    Console.WriteLine("Not held 2");
                    display.PreviewImage(bitmap);
                    Console.Read();
                    return(dcm);
                }

                return(null);
            }

            finally
            {
                openFile = null;
            }
        }
Exemplo n.º 2
0
 public MainWindow()
 {
     InitializeComponent();
     this.display    = new DisplayManagement(imageOriginalBox, imageProcessedBox);
     this.dcmManager = new DicomManager(display);
 }
Exemplo n.º 3
0
 public DicomManager(DisplayManagement display)
 {
     this.display = display;
 }