dicom: github.com/suyashkumar/dicom Index | Files | Directories

package dicom

import "github.com/suyashkumar/dicom"


Package Files

dicomdir.go parse.go

type DirectoryRecord Uses

type DirectoryRecord struct {
    Path string

DirectoryRecord contains info about one DICOM file mentioned in DICOMDIR.

func ParseDICOMDIR Uses

func ParseDICOMDIR(in io.Reader) (recs []DirectoryRecord, err error)

ParseDICOMDIR parses contents of a "DICOMDIR" stored in "in".


type ParseOptions Uses

type ParseOptions struct {
    // DropPixelData will cause the parser to skip the PixelData element
    // (bulk images) in ReadDataSet.
    DropPixelData bool

    // ReturnTags is a whitelist of tags to return.
    ReturnTags []dicomtag.Tag

    // StopAtag defines a tag at which when read (or a tag with a greater
    // value than it is read), the program will stop parsing the dicom file.
    StopAtTag *dicomtag.Tag

ParseOptions defines how DataSets and Elements are parsed.

type Parser Uses

type Parser interface {
    // Parse DICOM data
    Parse(options ParseOptions) (*element.DataSet, error)
    // ParseNext reads and parses the next element
    ParseNext(options ParseOptions) *element.Element
    // DecoderError fetches an error (if exists) from the dicomio.Decoder
    DecoderError() error // This should go away as we continue refactors
    // Finish should be called after manually parsing elements using ParseNext (instead of Parse)
    Finish() error // This should maybe go away as we continue refactors

Parser represents an entity that can read and parse DICOMs

func NewParser Uses

func NewParser(in io.Reader, bytesToRead int64, frameChannel chan *frame.Frame) (Parser, error)

NewParser initializes and returns a new Parser

func NewParserFromBytes Uses

func NewParserFromBytes(data []byte, frameChannel chan *frame.Frame) (Parser, error)

NewParserFromBytes initializes and returns a new Parser from []byte

func NewParserFromDecoder Uses

func NewParserFromDecoder(decoder *dicomio.Decoder, frameChannel chan *frame.Frame) (Parser, error)

NewParserFromDecoder returns parser from a decoder TODO: remove or cleanup, currently needed for testing

func NewParserFromFile Uses

func NewParserFromFile(path string, frameChannel chan *frame.Frame) (Parser, error)

NewParserFromFile initializes and returns a new dicom Parser from a file path

func NewUninitializedParserFromDecoder Uses

func NewUninitializedParserFromDecoder(decoder *dicomio.Decoder, frameChannel chan *frame.Frame) Parser

NewUninitializedParserFromDecoder returns parser from a decoder TODO: remove or cleanup, currently needed for testing


dicomioPackage dicomio provides utility functions for encoding and decoding low-level DICOM data types, such as integers and strings.
dicomlogPackage dicomlog performs logging for go-dicom or go-netdicom.
dicomtagPackage dicomtag enumerates element tags defined in the DICOM standard.
dicomuidPackage dicomuid defines standard UIDs, as defined in P3.6.

Package dicom imports 15 packages (graph) and is imported by 1 packages. Updated 2020-07-22. Refresh now. Tools for package owners.