Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DataSet ¶
DataSet writes the dataset into the stream in DICOM file format, complete with the magic header and metadata elements.
The transfer syntax (byte order, etc) of the file is determined by the TransferSyntax element in "ds". If ds is missing that or a few other essential elements, this function returns an error.
ds := ... read or create dicom.Dataset ... out, err := os.Create("test.dcm") err := write.DataSet(out, ds)
func DataSetToFile ¶
DataSetToFile writes "ds" to the given file. If the file already exists, existing contents are clobbered. Else, the file is newly created.
func Element ¶
Element encodes one data element. Errors are reported through e.Error() and/or E.Finish().
REQUIRES: Each value in values[] must match the VR of the tag. E.g., if tag is for UL, then each value must be uint32.
func FileHeader ¶
FileHeader produces a DICOM file header. metaElems[] is be a list of elements to be embedded in the header part. Every element in metaElems[] must have Tag.Group==2. It must contain at least the following three elements: TagTransferSyntaxUID, TagMediaStorageSOPClassUID, TagMediaStorageSOPInstanceUID. The list may contain other meta elements as long as their Tag.Group==2; they are added to the header.
Errors are reported via e.Error().
Consult the following page for the DICOM file header format.
http://dicom.nema.org/dicom/2013/output/chtml/part10/chapter_7.html
Types ¶
This section is empty.