Table of Contents

Class DicomWriter

Namespace
FellowOakDicom.IO.Writer
Assembly
fo-dicom.core.dll

DICOM object writer.

public class DicomWriter : IDicomDatasetWalker
Inheritance
DicomWriter
Implements
Inherited Members
Extension Methods

Constructors

DicomWriter(DicomTransferSyntax, DicomWriteOptions, IByteTarget)

Initializes an instance of DicomWriter.

public DicomWriter(DicomTransferSyntax syntax, DicomWriteOptions options, IByteTarget target)

Parameters

syntax DicomTransferSyntax

Writer transfer syntax.

options DicomWriteOptions

Writer options.

target IByteTarget

Target to which to write the DICOM object.

Properties

Syntax

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

public DicomTransferSyntax Syntax { get; set; }

Property Value

DicomTransferSyntax

Methods

OnBeginFragment(DicomFragmentSequence)

Handler for traversing beginning of fragment.

public bool OnBeginFragment(DicomFragmentSequence fragment)

Parameters

fragment DicomFragmentSequence

Fragment sequence.

Returns

bool

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.

public bool OnBeginSequence(DicomSequence sequence)

Parameters

sequence DicomSequence

Sequence to traverse.

Returns

bool

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.

public bool OnBeginSequenceItem(DicomDataset dataset)

Parameters

dataset DicomDataset

Item dataset.

Returns

bool

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.

public void OnBeginWalk()

OnElement(DicomElement)

Handler for traversing a DICOM element.

public bool OnElement(DicomElement element)

Parameters

element DicomElement

Element to traverse.

Returns

bool

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.

public Task<bool> OnElementAsync(DicomElement element)

Parameters

element DicomElement

Element to traverse.

Returns

Task<bool>

true if traversing completed without issues, false otherwise.

OnEndFragment()

Handler for traversing end of fragment.

public bool OnEndFragment()

Returns

bool

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.

public bool OnEndSequence()

Returns

bool

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.

public bool OnEndSequenceItem()

Returns

bool

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.

public void OnEndWalk()

OnFragmentItem(IByteBuffer)

Handler for traversing fragment item.

public bool OnFragmentItem(IByteBuffer item)

Parameters

item IByteBuffer

Buffer containing the fragment item.

Returns

bool

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.

public Task<bool> OnFragmentItemAsync(IByteBuffer item)

Parameters

item IByteBuffer

Buffer containing the fragment item.

Returns

Task<bool>

true if traversing completed without issues, false otherwise.