go2com

package module
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: GPL-3.0 Imports: 12 Imported by: 0

README

go2com (DICOM image parser)

Benchmark Result

Using 2 cores

Parsing result without skipping the PixelData option
goos: linux
goarch: amd64
pkg: github.com/okieraised/go2com
cpu: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
BenchmarkNewParser-2         246           4898625 ns/op
BenchmarkNewParser-2         222           5023251 ns/op
BenchmarkNewParser-2         240           4900945 ns/op
BenchmarkNewParser-2         241           4957440 ns/op
BenchmarkNewParser-2         238           4911706 ns/op
BenchmarkNewParser-2         241           5001905 ns/op
BenchmarkNewParser-2         240           5062585 ns/op
BenchmarkNewParser-2         238           4964253 ns/op
BenchmarkNewParser-2         240           4904890 ns/op
BenchmarkNewParser-2         237           4882366 ns/op
BenchmarkNewParser-2         238           4971147 ns/op
BenchmarkNewParser-2         240           5134180 ns/op
BenchmarkNewParser-2         246           4930679 ns/op
BenchmarkNewParser-2         232           4971505 ns/op
BenchmarkNewParser-2         241           5002399 ns/op
BenchmarkNewParser-2         242           4868371 ns/op
BenchmarkNewParser-2         241           4897682 ns/op
BenchmarkNewParser-2         246           5014649 ns/op
BenchmarkNewParser-2         236           4989994 ns/op
BenchmarkNewParser-2         236           5238820 ns/op
Parsing result with skipping the PixelData option
goos: linux
goarch: amd64
pkg: github.com/okieraised/go2com
cpu: Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
BenchmarkNewParser-2         248           4977196 ns/op
BenchmarkNewParser-2         241           4799562 ns/op
BenchmarkNewParser-2         250           4847411 ns/op
BenchmarkNewParser-2         237           4818379 ns/op
BenchmarkNewParser-2         223           4738318 ns/op
BenchmarkNewParser-2         252           4687902 ns/op
BenchmarkNewParser-2         242           4769615 ns/op
BenchmarkNewParser-2         249           4670712 ns/op
BenchmarkNewParser-2         254           4817976 ns/op
BenchmarkNewParser-2         244           4680175 ns/op
BenchmarkNewParser-2         259           4749270 ns/op
BenchmarkNewParser-2         237           4674772 ns/op
BenchmarkNewParser-2         255           4621554 ns/op
BenchmarkNewParser-2         229           5062034 ns/op
BenchmarkNewParser-2         252           4587018 ns/op
BenchmarkNewParser-2         253           4697444 ns/op
BenchmarkNewParser-2         261           4802300 ns/op
BenchmarkNewParser-2         259           4789614 ns/op
BenchmarkNewParser-2         244           5045803 ns/op
BenchmarkNewParser-2         232           4986901 ns/op

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitTagDict added in v0.1.6

func InitTagDict()

Types

type MappedTag added in v0.1.2

type MappedTag map[string]tag.TagBrowser

func (MappedTag) GetElementByTagString added in v0.1.2

func (m MappedTag) GetElementByTagString(tagStr string) (interface{}, error)

GetElementByTagString returns the element value of the input tag Tag should be in (gggg,eeee) or ggggeeee format

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser implements the field required to parse the dicom file

func NewParser

func NewParser(fileReader io.Reader, fileSize int64, skipPixelData, skipDataset bool) (*Parser, error)

NewParser returns a new dicom parser

func (*Parser) Export

func (p *Parser) Export(exportMeta bool) MappedTag

Export returns the mapped tag/(vr,value) dictionary

func (*Parser) GetDataset

func (p *Parser) GetDataset() dataset.Dataset

GetDataset returns the dataset

func (*Parser) GetElementByTagString added in v0.1.2

func (p *Parser) GetElementByTagString(tagStr string) (interface{}, error)

GetElementByTagString returns the element value of the input tag Tag should be in (gggg,eeee) or ggggeeee format

func (*Parser) GetMetadata

func (p *Parser) GetMetadata() dataset.Dataset

GetMetadata returns the file meta header

func (*Parser) Parse

func (p *Parser) Parse() error

Directories

Path Synopsis
cmd
tag
internal
pkg

Jump to

Keyboard shortcuts

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