private void BuildWalkQueue(IEnumerable <DicomItem> dataset)
 {
     foreach (DicomItem item in dataset)
     {
         if (item is DicomElement)
         {
             _items.Enqueue(item);
         }
         else if (item is DicomFragmentSequence)
         {
             DicomFragmentSequence sq = item as DicomFragmentSequence;
             _items.Enqueue(item);
             foreach (IByteBuffer fragment in sq)
             {
                 _items.Enqueue(new DicomFragmentItem(fragment));
             }
             _items.Enqueue(new EndDicomFragment());
         }
         else if (item is DicomSequence)
         {
             DicomSequence sq = item as DicomSequence;
             _items.Enqueue(item);
             foreach (DicomDataset sqi in sq)
             {
                 _items.Enqueue(new BeginDicomSequenceItem(sqi));
                 BuildWalkQueue(sqi);
                 _items.Enqueue(new EndDicomSequenceItem());
             }
             _items.Enqueue(new EndDicomSequence());
         }
     }
 }
Example #2
0
 public bool OnBeginFragment(DicomFragmentSequence fragment)
 {
     return(true);
 }