public static void WriteObjectLittleEndian(DICOMBinaryWriter dw, DICOMWriteSettings settings, DICOMObject d)
 {
     for (int i = 0; i < d.Elements.Count; i++)
     {
         IDICOMElement      el = d.Elements[i];
         DICOMWriteSettings currentSettings = IsFileMetaGroup(el) ? settings.GetFileMetaSettings() : settings;
         if (GroupWriter.IsGroupHeader(el))
         {
             int skip = GroupWriter.WriteGroupLittleEndian(dw, currentSettings, d, el);
             i += skip;
         }
         else
         {
             DICOMElementWriter.WriteLittleEndian(dw, currentSettings, el);
         }
     }
 }
 public static void WriteObjectLittleEndian(DICOMBinaryWriter dw, DICOMWriteSettings settings, DICOMObject d)
 {
     for (int i = 0; i < d.Elements.Count; i++)
     {
         IDICOMElement el = d.Elements[i];
         DICOMWriteSettings currentSettings = IsFileMetaGroup(el) ? settings.GetFileMetaSettings() : settings;
         if (GroupWriter.IsGroupHeader(el))
         {
             int skip = GroupWriter.WriteGroupLittleEndian(dw, currentSettings, d, el);
             i += skip;
         }
         else
         {
             DICOMElementWriter.WriteLittleEndian(dw, currentSettings, el);
         }
     }
 }
 public static void Write(DICOMBinaryWriter dw, DICOMWriteSettings settings, DICOMObject d)
 {
     for (int i = 0; i < d.Elements.Count; i++)
     {
         IDICOMElement el = d.Elements[i];
         TransferSyntaxHelper.SetSyntax(d,settings.TransferSyntax);
         DICOMWriteSettings currentSettings = IsFileMetaGroup(el) ? settings.GetFileMetaSettings() : settings;
         if (GroupWriter.IsGroupHeader(el))
         {
             int skip = GroupWriter.WriteGroup(dw, currentSettings, d, el);
             i += skip;
         }
         else
         {
             DICOMElementWriter.Write(dw, currentSettings, el);
         }
     }
 }
Example #4
0
 public static void Write(DICOMBinaryWriter dw, DICOMWriteSettings settings, DICOMObject d, bool isSequenceItem = false)
 {
     for (int i = 0; i < d.Elements.Count; i++)
     {
         IDICOMElement el = d.Elements[i];
         if (!isSequenceItem)
         {
             TransferSyntaxHelper.SetSyntax(d, settings.TransferSyntax);
         }
         DICOMWriteSettings currentSettings = IsFileMetaGroup(el) ? settings.GetFileMetaSettings() : settings;
         if (GroupWriter.IsGroupHeader(el))
         {
             int skip = GroupWriter.WriteGroup(dw, currentSettings, d, el);
             i += skip;
         }
         else
         {
             DICOMElementWriter.Write(dw, currentSettings, el);
         }
     }
 }