Documentation
¶
Overview ¶
Package dicomjson converts DICOM datasets to and from JSON.
Index ¶
- func DatasetToMap(ds *godicom.Dataset, opts ...Option) (map[string]Element, error)
- func DecodeDataset(r io.Reader, opts ...Option) (*godicom.Dataset, error)
- func MarshalDataset(ds *godicom.Dataset, opts ...Option) ([]byte, error)
- func MarshalDatasetString(ds *godicom.Dataset, opts ...Option) (string, error)
- func MarshalDatasets(datasets []*godicom.Dataset, opts ...Option) ([]byte, error)
- func ParseDataset(data []byte, opts ...Option) (*godicom.Dataset, error)
- func ParseDatasets(data []byte, opts ...Option) ([]*godicom.Dataset, error)
- type BulkDataURIBuilder
- type BulkDataURIReader
- type Element
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DatasetToMap ¶
DatasetToMap returns the DICOM JSON Model map representation of ds.
func DecodeDataset ¶
DecodeDataset reads a DICOM JSON Model dataset from r.
func MarshalDataset ¶
MarshalDataset returns sorted JSON for a DICOM JSON Model dataset.
func MarshalDatasetString ¶
MarshalDatasetString returns a sorted JSON string for a DICOM JSON Model dataset.
func MarshalDatasets ¶ added in v0.23.0
MarshalDatasets returns a JSON array of DICOM JSON Model datasets.
func ParseDataset ¶
ParseDataset parses a DICOM JSON Model dataset.
Types ¶
type BulkDataURIBuilder ¶
BulkDataURIBuilder returns a BulkDataURI while marshaling large binary values.
type BulkDataURIReader ¶
BulkDataURIReader resolves a BulkDataURI while parsing JSON.
type Element ¶
type Element struct {
VR string `json:"vr"`
Value []json.RawMessage `json:"Value,omitempty"`
InlineBinary string `json:"InlineBinary,omitempty"`
BulkDataURI string `json:"BulkDataURI,omitempty"`
}
Element is the DICOM JSON Model representation of a data element.
type Option ¶
type Option func(*options)
Option configures DICOM JSON Model parsing or marshaling.
func WithBulkDataThreshold ¶
WithBulkDataThreshold sets the base64 size threshold for BulkDataURI output.
func WithBulkDataURIBuilder ¶
func WithBulkDataURIBuilder(fn BulkDataURIBuilder) Option
WithBulkDataURIBuilder sets the callback used to produce BulkDataURI values.
func WithBulkDataURIReader ¶
func WithBulkDataURIReader(fn BulkDataURIReader) Option
WithBulkDataURIReader sets the callback used to resolve BulkDataURI values.
func WithSuppressInvalidTags ¶
func WithSuppressInvalidTags() Option
WithSuppressInvalidTags drops elements that fail marshaling.