Documentation ¶
Index ¶
- Constants
- func NewDICOMReader(reader *bufio.Reader, options ...func(*dcmReader)) *dcmReader
- func WithAllowNonCompliantDcm(allowNonCompliantDcm bool) func(*dcmReader)
- func WithSetFileSize(fileSize int64) func(*dcmReader)
- func WithSkipDataset(skipDataset bool) func(*dcmReader)
- func WithSkipPixelData(skipPixelData bool) func(*dcmReader)
- type Dataset
- type DicomUID
- type Element
- type MappedTag
- type Value
Constants ¶
const ( MagicString = "DICM" PrivateTag = "PrivateTag" )
const (
VLUndefinedLength uint32 = 0xFFFFFFFF
)
Variables ¶
This section is empty.
Functions ¶
func NewDICOMReader ¶ added in v0.5.0
NewDICOMReader returns a new reader
func WithAllowNonCompliantDcm ¶ added in v0.5.0
func WithAllowNonCompliantDcm(allowNonCompliantDcm bool) func(*dcmReader)
WithAllowNonCompliantDcm provides option to keep trying to parse the file even if it's not DICOM compliant e.g.: Missing header, missing FileMetaInformationGroupLength,...
func WithSetFileSize ¶ added in v0.5.0
func WithSetFileSize(fileSize int64) func(*dcmReader)
WithSetFileSize provides option to set the file size to the reader
func WithSkipDataset ¶ added in v0.5.0
func WithSkipDataset(skipDataset bool) func(*dcmReader)
WithSkipDataset provides option to read only the metadata header. If true, only the meta header is read, else, the dataset will be read
func WithSkipPixelData ¶ added in v0.5.0
func WithSkipPixelData(skipPixelData bool) func(*dcmReader)
WithSkipPixelData provides option to skip reading pixel data (7FE0,0010). If true, pixel data is skipped. If false, pixel data will be read
Types ¶
type Dataset ¶ added in v0.5.0
type Dataset struct {
Elements []*Element `json:"elements"`
}
func (*Dataset) FindElementByTag ¶ added in v0.5.0
FindElementByTag returns the corresponding element of the input tag name.
func (*Dataset) FindElementByTagName ¶ added in v0.5.0
FindElementByTagName returns the corresponding element of the input tag name.
func (*Dataset) FindElementByTagStr ¶ added in v0.5.0
FindElementByTagStr returns the corresponding element of the input tag. Tag must be in 'ggggeeee' or '(gggg,eeee)' format
func (*Dataset) RetrieveFileUID ¶ added in v0.5.0
type Element ¶ added in v0.5.0
type Element struct { Value Value `json:"value"` TagName string `json:"tag_name"` ValueRepresentationStr string `json:"value_representation_str"` ValueLength uint32 `json:"value_length"` Tag tag.DicomTag `json:"tag"` ValueRepresentation vr.VRKind `json:"value_representation"` }
Element defines the struct for each dicom tag element info. Ordered as below to decrease the memory footprint
type MappedTag ¶ added in v0.1.2
type MappedTag map[string]tag.TagBrowser
func (MappedTag) GetElementByTagString ¶ added in v0.1.2
GetElementByTagString returns the element value of the input tag Tag should be in (gggg,eeee) or ggggeeee format