Open Flowergift opened 2 months ago
Dear hong-haier,
I've tested your code in my PC (Same with your envir : Win11 + VS2022)
But...
Something is unexpected.
Can you check your code? Or can you let me some helps to "Not shown any image after .dcm file select?
(All my .dcm files are n/a. These are well opened in my other dicom viewer S/W).
Maybe @ your code,
Somewhere is strange~ But there is no error message in cmd console when running.
I've resolved the "System.Reflection.Assembly.Loadfrom" error but nothing image shown up now.
And correctly linked "SimpleITKCSharpManaged.dll(1.64MB)" and "SimpleITKCSharpNative.dll(419MB)" for simpleITK 2.3.1.
Excuse me but can you check your these file size?
========================================================================
private void LoadSeriesButton_Click(object sender, RoutedEventArgs e) { CommonOpenFileDialog dialog = new CommonOpenFileDialog(); dialog.IsFolderPicker = false; dialog.Multiselect = true;
if (dialog.ShowDialog() == CommonFileDialogResult.Ok) { _dicomFiles = new List<DicomFile>(); DicomFileScanner fileScanner = new DicomFileScanner(); fileScanner.FileFound += FileScanner_FileFound; fileScanner.Progress += FileScanner_Progress; fileScanner.Complete += FileScanner_Complete; fileScanner.Start(dialog.FileName); }
}
private void FileScanner_Complete(DicomFileScanner scanner) { if (this._dicomVolume != null) { this._dicomVolume.Dispose(); } Application.Current.Dispatcher.Invoke(() => { this._dicomVolume = new DicomVolume(_dicomFiles.Select(file => new ImageData(file.Dataset))); this._maskVolume = new MaskVolume(this._dicomVolume); this.MedicalViewer.SetVolumes(this._dicomVolume, this._maskVolume); //this.d3Viewer.SetMaskVolume(maskVolume); log.Debug($"WW:{_dicomVolume.WindowWidth},WC:{_dicomVolume.WindowCenter}"); }); }
private void FileScanner_Progress(DicomFileScanner scanner, string directory, int count) { log.Debug($"{directory}, {count}"); }
private void FileScanner_FileFound(DicomFileScanner scanner, DicomFile file, string fileName) { _dicomFiles.Add(file); }
And same problem with my well opened ".mhd" files with ".raw" files.
Can you send me the correct your succeeded .dcm files and .mhd files with .raw data?
flowergift80@gmail.com
Dear hong-haier,
I've tested your code in my PC (Same with your envir : Win11 + VS2022)
But...
Something is unexpected.
Can you check your code? Or can you let me some helps to "Not shown any image after .dcm file select?
(All my .dcm files are n/a. These are well opened in my other dicom viewer S/W).
Maybe @ your code,
Somewhere is strange~ But there is no error message in cmd console when running.
I've resolved the "System.Reflection.Assembly.Loadfrom" error but nothing image shown up now.
And correctly linked "SimpleITKCSharpManaged.dll(1.64MB)" and "SimpleITKCSharpNative.dll(419MB)" for simpleITK 2.3.1.
Excuse me but can you check your these file size?
========================================================================
private void LoadSeriesButton_Click(object sender, RoutedEventArgs e) { CommonOpenFileDialog dialog = new CommonOpenFileDialog(); dialog.IsFolderPicker = false; dialog.Multiselect = true;
}
private void FileScanner_Complete(DicomFileScanner scanner) { if (this._dicomVolume != null) { this._dicomVolume.Dispose(); } Application.Current.Dispatcher.Invoke(() => { this._dicomVolume = new DicomVolume(_dicomFiles.Select(file => new ImageData(file.Dataset))); this._maskVolume = new MaskVolume(this._dicomVolume); this.MedicalViewer.SetVolumes(this._dicomVolume, this._maskVolume); //this.d3Viewer.SetMaskVolume(maskVolume); log.Debug($"WW:{_dicomVolume.WindowWidth},WC:{_dicomVolume.WindowCenter}"); }); }
private void FileScanner_Progress(DicomFileScanner scanner, string directory, int count) { log.Debug($"{directory}, {count}"); }
private void FileScanner_FileFound(DicomFileScanner scanner, DicomFile file, string fileName) { _dicomFiles.Add(file); }