Click here to Skip to main content
15,886,701 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Actually i want to view DICOM images of one patient 3 Different series, Series one contaions 95 dcm Files.
How i can load 95 files or load folder in one cell so i can screll mouse to view frames one by one in one cell.
I do not want to use DICOMDIR file.

What I have tried:

C#
FolderBrowserDialog dlg = new FolderBrowserDialog();
if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
{
   DirectoryInfo dir = new DirectoryInfo(dlg.SelectedPath);
   foreach (var file in dir.GetFiles("*.DCM", SearchOption.TopDirectoryOnly))
   {
      DicomDataSet dataSet = new DicomDataSet();
      dataSet.Load(file.FullName, DicomDataSetLoadFlags.None);
      dicomDataSetList.Add(dataSet);
      using (RasterCodecs codecs = new RasterCodecs())
      {
         RasterImageListItem item = new RasterImageListItem(codecs.Load(file.FullName, 400, 400, 0, Leadtools.RasterSizeFlags.Bicubic, CodecsLoadByteOrder.RgbOrGray, 1, 1), 10, "dfgd");

         item.FileName = file.FullName;
         item.Tag = dicomDataSetList.IndexOf(dataSet);
         imageList.Items.Add(item);
      }
   }
}
Posted
Updated 1-May-22 0:34am
v2
Comments
[no name] 6-May-22 12:44pm    
If you're viewing "one by one", you don't "load 95 files"; you still only load one at a time as you "scroll"; i.e. you use the scroll event to cycle through a list of "file names" to load.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900