gen

package
v0.0.0-...-97aa02a Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ProtoHeader = "syntax = \"proto3\";\noption go_package = \"github.com/gradienthealth/dicom-protos/protos\";"

ProtoHeader represents the protocol buffer header for all protos

Variables

View Source
var SetComplete = map[string]*parse.Attribute{}

SetComplete holds on to attributes that have been generated already

View Source
var VRToProto = map[string]string{
	"UT":       "string",
	"US":       "uint32",
	"UN":       "bytes",
	"UL":       "uint32",
	"UI":       "string",
	"TM":       "int64",
	"ST":       "string",
	"SS":       "int32",
	"SQ":       "bytes",
	"SL":       "int32",
	"SH":       "string",
	"PN":       "string",
	"OW":       "bytes",
	"OF":       "string",
	"OD":       "string",
	"OB":       "string",
	"LT":       "string",
	"LO":       "string",
	"IS":       "int32",
	"FD":       "double",
	"FL":       "float",
	"DT":       "int64",
	"DS":       "float",
	"DA":       "string",
	"CS":       "string",
	"AT":       "string",
	"AS":       "string",
	"AE":       "string",
	"UC":       "string",
	"UR":       "string",
	"":         "bytes",
	"OL":       "int32",
	"US or SS": "int64",
	"US or OW": "bytes",
	"OB or OW": "bytes",
}

VRToProto maps a DICOM VR to the corresponding proto type (Part 5 6.2)

Functions

func AttributeProto

func AttributeProto(a *parse.Attribute) string

AttributeProto generates the protocol message for an attribute and returns it as a string

func ModuleProto

func ModuleProto(module *parse.Module, w io.Writer)

ModuleProto generates the corresponding protocol buffer for the module and writes it to w

func ProtosToFile

func ProtosToFile(dirPath string, modules []*parse.Module) (counter int, err error)

ProtosToFile generates ALL protos from the provided modules to the directory path specified

func SequenceAttrProto

func SequenceAttrProto(a *parse.Attribute, wSeq, wAttr io.Writer) error

SequenceAttrProto generates two protocol buffer files for Sequences and Leaf Attributes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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