legacy

package module
v0.0.0-...-f303514 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 18, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectoryRecord

type DirectoryRecord struct {
	Path string
}

DirectoryRecord contains info about one DICOM file mentioned in DICOMDIR.

func ParseDICOMDIR

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

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

http://dicom.nema.org/medical/Dicom/2016b/output/chtml/part03/sect_F.2.2.2.html

type ParseOptions

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

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

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

NewParser initializes and returns a new Parser

func NewParserFromBytes

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

NewParserFromBytes initializes and returns a new Parser from []byte

func NewParserFromDecoder

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

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

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

func NewUninitializedParserFromDecoder

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

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

Directories

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL