Fellow Oak DICOM
Search Results for

    Show / Hide Table of Contents

    Class DicomWriter

    DICOM object writer.

    Inheritance
    System.Object
    DicomWriter
    Implements
    IDicomDatasetWalker
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: FellowOakDicom.IO.Writer
    Assembly: fo-dicom.core.dll
    Syntax
    public class DicomWriter : IDicomDatasetWalker

    Constructors

    DicomWriter(DicomTransferSyntax, DicomWriteOptions, IByteTarget)

    Initializes an instance of DicomWriter.

    Declaration
    public DicomWriter(DicomTransferSyntax syntax, DicomWriteOptions options, IByteTarget target)
    Parameters
    Type Name Description
    DicomTransferSyntax syntax

    Writer transfer syntax.

    DicomWriteOptions options

    Writer options.

    IByteTarget target

    Target to which to write the DICOM object.

    Properties

    Syntax

    Gets or sets the DICOM transfer syntax to apply in writing.

    Declaration
    public DicomTransferSyntax Syntax { get; set; }
    Property Value
    Type Description
    DicomTransferSyntax

    Methods

    OnBeginFragment(DicomFragmentSequence)

    Handler for traversing beginning of fragment.

    Declaration
    public bool OnBeginFragment(DicomFragmentSequence fragment)
    Parameters
    Type Name Description
    DicomFragmentSequence fragment

    Fragment sequence.

    Returns
    Type Description
    System.Boolean

    true if traversing completed without issues, false otherwise.

    Remarks

    On false return value, the method will invoke the callback method passed in OnBeginWalk() before returning.

    OnBeginSequence(DicomSequence)

    Handler for traversing beginning of sequence.

    Declaration
    public bool OnBeginSequence(DicomSequence sequence)
    Parameters
    Type Name Description
    DicomSequence sequence

    Sequence to traverse.

    Returns
    Type Description
    System.Boolean

    true if traversing completed without issues, false otherwise.

    Remarks

    On false return value, the method will invoke the callback method passed in OnBeginWalk() before returning.

    OnBeginSequenceItem(DicomDataset)

    Handler for traversing beginning of sequence item.

    Declaration
    public bool OnBeginSequenceItem(DicomDataset dataset)
    Parameters
    Type Name Description
    DicomDataset dataset

    Item dataset.

    Returns
    Type Description
    System.Boolean

    true if traversing completed without issues, false otherwise.

    Remarks

    On false return value, the method will invoke the callback method passed in OnBeginWalk() before returning.

    OnBeginWalk()

    Handler for beginning the traversal.

    Declaration
    public void OnBeginWalk()

    OnElement(DicomElement)

    Handler for traversing a DICOM element.

    Declaration
    public bool OnElement(DicomElement element)
    Parameters
    Type Name Description
    DicomElement element

    Element to traverse.

    Returns
    Type Description
    System.Boolean

    true if traversing completed without issues, false otherwise.

    Remarks

    On false return value, the method will invoke the callback method passed in OnBeginWalk() before returning.

    OnElementAsync(DicomElement)

    Asynchronous handler for traversing a DICOM element.

    Declaration
    public async Task<bool> OnElementAsync(DicomElement element)
    Parameters
    Type Name Description
    DicomElement element

    Element to traverse.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    true if traversing completed without issues, false otherwise.

    OnEndFragment()

    Handler for traversing end of fragment.

    Declaration
    public bool OnEndFragment()
    Returns
    Type Description
    System.Boolean

    true if traversing completed without issues, false otherwise.

    Remarks

    On false return value, the method will invoke the callback method passed in OnBeginWalk() before returning.

    OnEndSequence()

    Handler for traversing end of sequence.

    Declaration
    public bool OnEndSequence()
    Returns
    Type Description
    System.Boolean

    true if traversing completed without issues, false otherwise.

    Remarks

    On false return value, the method will invoke the callback method passed in OnBeginWalk() before returning.

    OnEndSequenceItem()

    Handler for traversing end of sequence item.

    Declaration
    public bool OnEndSequenceItem()
    Returns
    Type Description
    System.Boolean

    true if traversing completed without issues, false otherwise.

    Remarks

    On false return value, the method will invoke the callback method passed in OnBeginWalk() before returning.

    OnEndWalk()

    Handler for end of traversal.

    Declaration
    public void OnEndWalk()

    OnFragmentItem(IByteBuffer)

    Handler for traversing fragment item.

    Declaration
    public bool OnFragmentItem(IByteBuffer item)
    Parameters
    Type Name Description
    IByteBuffer item

    Buffer containing the fragment item.

    Returns
    Type Description
    System.Boolean

    true if traversing completed without issues, false otherwise.

    Remarks

    On false return value, the method will invoke the callback method passed in OnBeginWalk() before returning.

    OnFragmentItemAsync(IByteBuffer)

    Asynchronous handler for traversing fragment item.

    Declaration
    public async Task<bool> OnFragmentItemAsync(IByteBuffer item)
    Parameters
    Type Name Description
    IByteBuffer item

    Buffer containing the fragment item.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    true if traversing completed without issues, false otherwise.

    Implements

    IDicomDatasetWalker

    Extension Methods

    LinqExtensions.IsOneOf<T>(T, T[])
    In This Article
    Back to top Copyright (c) 2012-2025 fo-dicom contributors