Versions in this module Expand all Collapse all v1 v1.0.5 Oct 21, 2021 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 ErrorMagicWord = errors.New("error, DICM magic word not found in correct location") + var ErrorMetaElementGroupLength = errors.New("MetaElementGroupLength tag not found where expected") + 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) (Dataset, error) + 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 + RawValueRepresentation string + ValueLength uint32 + ValueRepresentation tag.VRKind + type FlatDatasetIterator struct + func (f *FlatDatasetIterator) HasNext() bool + func (f *FlatDatasetIterator) Next() *Element + type ParseOption func(*parseOptSet) + func SkipMetadataReadOnNewParserInit() ParseOption type Parser + func (p *Parser) GetMetadata() Dataset + func (p *Parser) Next() (*Element, error) + func (p *Parser) SetTransferSyntax(bo binary.ByteOrder, implicit bool) type PixelDataInfo + RawData []byte + func MustGetPixelDataInfo(v Value) PixelDataInfo + type SequenceItemValue struct + func (s *SequenceItemValue) GetValue() interface{} + func (s *SequenceItemValue) MarshalJSON() ([]byte, error) + func (s *SequenceItemValue) String() string + func (s *SequenceItemValue) ValueType() ValueType + type Value interface + 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 v0 v0.4.0 Jun 27, 2019 Changes in this version type Parser + func NewParserFromDecoder(decoder *dicomio.Decoder, frameChannel chan *frame.Frame) (Parser, error) + func NewUninitializedParserFromDecoder(decoder *dicomio.Decoder, frameChannel chan *frame.Frame) Parser v0.3.0 Oct 16, 2018 Changes in this version + const GoDICOMImplementationClassUIDPrefix + const GoDICOMImplementationVersionName + const InvalidDay + const InvalidMonth + const InvalidYear + var GoDICOMImplementationClassUID = GoDICOMImplementationClassUIDPrefix + ".1.1" + func WriteDataSet(out io.Writer, ds *DataSet) error + func WriteDataSetToFile(path string, ds *DataSet) error + func WriteElement(e *dicomio.Encoder, elem *Element) + func WriteFileHeader(e *dicomio.Encoder, metaElems []*Element) + type DataSet struct + Elements []*Element + func (f *DataSet) FindElementByName(name string) (*Element, error) + func (f *DataSet) FindElementByTag(tag dicomtag.Tag) (*Element, error) + type DateInfo struct + Day int + Month int + Str string + Year int + func ParseDate(s string) (startDate, endDate DateInfo, err error) + func (d DateInfo) String() string + type DirectoryRecord struct + Path string + func ParseDICOMDIR(in io.Reader) (recs []DirectoryRecord, err error) + type Element struct + Tag dicomtag.Tag + UndefinedLength bool + VR string + Value []interface{} + func FindElementByName(elems []*Element, name string) (*Element, error) + func FindElementByTag(elems []*Element, tag dicomtag.Tag) (*Element, error) + func MustNewElement(tag dicomtag.Tag, values ...interface{}) *Element + func NewElement(tag dicomtag.Tag, values ...interface{}) (*Element, error) + func Query(ds *DataSet, f *Element) (match bool, matchedElem *Element, err error) + func (e *Element) GetString() (string, error) + func (e *Element) GetStrings() ([]string, error) + func (e *Element) GetUInt16() (uint16, error) + func (e *Element) GetUInt32() (uint32, error) + func (e *Element) GetUint16s() ([]uint16, error) + func (e *Element) GetUint32s() ([]uint32, error) + func (e *Element) MustGetString() string + func (e *Element) MustGetStrings() []string + func (e *Element) MustGetUInt16() uint16 + func (e *Element) MustGetUInt32() uint32 + func (e *Element) MustGetUint16s() []uint16 + func (e *Element) MustGetUint32s() []uint32 + func (e *Element) String() string + type EncapsulatedFrame struct + Data []byte + type Frame struct + EncapsulatedData EncapsulatedFrame + IsEncapsulated bool + NativeData NativeFrame + type NativeFrame struct + BitsPerSample int + Cols int + Data [][]int + Rows int + type ParseOptions struct + DropPixelData bool + ReturnTags []dicomtag.Tag + StopAtTag *dicomtag.Tag + type Parser interface + DecoderError func() error + Finish func() error + Parse func(options ParseOptions) (*DataSet, error) + ParseNext func(options ParseOptions) *Element + func NewParser(in io.Reader, bytesToRead int64, frameChannel chan *Frame) (Parser, error) + func NewParserFromBytes(data []byte, frameChannel chan *Frame) (Parser, error) + func NewParserFromFile(path string, frameChannel chan *Frame) (Parser, error) + type PixelDataInfo struct + Frames []Frame + IsEncapsulated bool + Offsets []uint32 + func (data PixelDataInfo) String() string v0.1.0 Sep 6, 2015