Versions in this module Expand all Collapse all v1 v1.0.1 May 8, 2024 Changes in this version + var ErrorElementNotFound = errors.New("element not found") + var ErrorEndOfDICOM = errors.New("this indicates to the caller of Next() that the DICOM has been fully parsed") + var ErrorExpectedEvenLength = errors.New("field length is not even, in violation of DICOM spec") + var ErrorMagicWord = errors.New("error, DICM magic word not found in correct location") + var ErrorMetaElementGroupLength = errors.New("MetaElementGroupLength tag not found where expected") + var ErrorMismatchPixelDataLength = errors.New(...) + var ErrorMismatchValueTypeAndVR = errors.New("ValueType does not match the VR required") + var ErrorOWRequiresEvenVL = errors.New("vr of OW requires even value length") + var ErrorUnexpectedDataType = errors.New("the type of the data was unexpected or not allowed") + var ErrorUnexpectedValueType = errors.New("Unexpected ValueType") + var ErrorUnimplemented = errors.New("this functionality is not yet implemented") + var ErrorUnsupportedBitsAllocated = errors.New("unsupported BitsAllocated") + var ErrorUnsupportedBitsPerSample = errors.New("unsupported BitsPerSample value") + var ErrorUnsupportedVR = errors.New("unsupported VR") + func ExhaustElementChannel(c <-chan *Element) + func MustGetBytes(v Value) []byte + func MustGetFloats(v Value) []float64 + func MustGetInts(v Value) []int + func MustGetStrings(v Value) []string + func Write(out io.Writer, ds Dataset, opts ...WriteOption) error + type Dataset struct + Elements []*Element + func Parse(in io.Reader, bytesToRead int64, frameChan chan *frame.Frame, ...) (Dataset, error) + func ParseFile(filepath string, frameChan chan *frame.Frame, opts ...ParseOption) (Dataset, error) + func ParseUntilEOF(in io.Reader, frameChan chan *frame.Frame, opts ...ParseOption) (Dataset, error) + func (d *Dataset) Equals(target *Dataset) bool + func (d *Dataset) FindElementByTag(tag tag.Tag) (*Element, error) + func (d *Dataset) FindElementByTagNested(tag tag.Tag) (*Element, error) + func (d *Dataset) FlatIterator() <-chan *Element + func (d *Dataset) FlatStatefulIterator() *FlatDatasetIterator + func (d *Dataset) String() string + type Element struct + RawValueRepresentation string + Tag tag.Tag + Value Value + ValueLength uint32 + ValueRepresentation tag.VRKind + func NewElement(t tag.Tag, data interface{}) (*Element, error) + func (e *Element) Equals(target *Element) bool + func (e *Element) String() string + type FlatDatasetIterator struct + func (f *FlatDatasetIterator) HasNext() bool + func (f *FlatDatasetIterator) Next() *Element + type ParseOption func(*parseOptSet) + func AllowMismatchPixelDataLength() ParseOption + func AllowMissingMetaElementGroupLength() ParseOption + func SkipMetadataReadOnNewParserInit() ParseOption + func SkipPixelData() ParseOption + func SkipProcessingPixelDataValue() ParseOption + type Parser struct + func NewParser(in io.Reader, bytesToRead int64, frameChannel chan *frame.Frame, ...) (*Parser, error) + func (p *Parser) GetMetadata() Dataset + func (p *Parser) Next() (*Element, error) + func (p *Parser) SetTransferSyntax(bo binary.ByteOrder, implicit bool) + type PixelDataInfo struct + Frames []*frame.Frame + IntentionallySkipped bool + IntentionallyUnprocessed bool + IsEncapsulated bool + Offsets []uint32 + ParseErr error + UnprocessedValueData []byte + func MustGetPixelDataInfo(v Value) PixelDataInfo + type SequenceItemValue struct + func (s *SequenceItemValue) Equals(target Value) bool + func (s *SequenceItemValue) GetValue() interface{} + func (s *SequenceItemValue) MarshalJSON() ([]byte, error) + func (s *SequenceItemValue) String() string + func (s *SequenceItemValue) ValueType() ValueType + type Value interface + Equals func(Value) bool + GetValue func() interface{} + MarshalJSON func() ([]byte, error) + String func() string + ValueType func() ValueType + func NewValue(data interface{}) (Value, error) + type ValueType int + const Bytes + const Floats + const Ints + const PixelData + const SequenceItem + const Sequences + const Strings + type WriteOption func(*writeOptSet) + func DefaultMissingTransferSyntax() WriteOption + func SkipVRVerification() WriteOption + func SkipValueTypeVerification() WriteOption + type Writer struct + func NewWriter(out io.Writer, opts ...WriteOption) *Writer + func (w *Writer) SetTransferSyntax(bo binary.ByteOrder, implicit bool) + func (w *Writer) WriteElement(e *Element) error