Documentation
¶
Index ¶
Constants ¶
const (
MagicString = "DICM"
)
const (
PrivateTag = "PrivateTag"
)
const (
VLUndefinedLength uint32 = 0xFFFFFFFF
)
Variables ¶
This section is empty.
Functions ¶
func WithSetFileSize ¶
func WithSetFileSize(fileSize int64) func(*dcmReader)
WithSetFileSize provides option to set the file size to the reader
func WithSkipDataset ¶
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 ¶
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 ¶
type Dataset struct {
Elements []*Element `json:"elements"`
}
func (*Dataset) FindElementByTag ¶
FindElementByTag returns the corresponding element of the input tag name.
func (*Dataset) FindElementByTagName ¶
FindElementByTagName returns the corresponding element of the input tag name.
func (*Dataset) FindElementByTagStr ¶
FindElementByTagStr returns the corresponding element of the input tag. Tag must be in 'ggggeeee' or '(gggg,eeee)' format
func (*Dataset) RetrieveFileUID ¶
type DcmReader ¶
type DcmReader interface { io.Reader IsImplicit() bool SkipPixelData() bool ByteOrder() binary.ByteOrder SetFileSize(fileSize int64) error GetFileSize() int64 Parse() error GetMetadata() Dataset GetDataset() Dataset RetrieveFileUID() (*DicomUID, error) GetElementByTagString(tagStr string) (interface{}, error) ExportDatasetTags(exportMeta bool) MappedTag ExportSeriesTags() MappedTag // contains filtered or unexported methods }
func NewDICOMReader ¶
NewDICOMReader returns a new reader
type Element ¶
type Element struct { Value Value TagName string ValueRepresentationStr string ValueLength uint32 Tag tag.DicomTag ValueRepresentation vr.VRKind }
Element defines the struct for each dicom tag element info. Ordered as below to decrease the memory footprint
type MappedTag ¶
type MappedTag map[string]tag.TagBrowser
func (MappedTag) GetElementByTagString ¶
GetElementByTagString returns the element value of the input tag Tag should be in (gggg,eeee) or ggggeeee format