You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey all,
I am new to the great library and being to implement a dicom application to connect to PACS. I refer to the godoc to create a dataset with sequence item. Finally, I print the dataset value and get the null. Thank you.
I found the bug that second parameter must be slice for NewElement function. element_2, _ := dicom.NewElement(tag.PatientName, []string{"Alice"}) element_3, _ := dicom.NewElement(tag.PatientID, []string{"12345"})
Hey all,
I am new to the great library and being to implement a dicom application to connect to PACS. I refer to the godoc to create a dataset with sequence item. Finally, I print the dataset value and get the null. Thank you.
`
import (
"fmt"
)
func main() {
element_1, _ := dicom.NewElement(tag.Modality, []string{"SR"})
element_2, _ := dicom.NewElement(tag.PatientName, "Alice")
element_3, _ := dicom.NewElement(tag.PatientID, "12345")
seqItem := [][]*dicom.Element{
{
element_2,
element_3,
},
}
sequenceElement, _ := dicom.NewElement(tag.ConceptNameCodeSequence, seqItem)
ds := dicom.Dataset{
Elements: []*dicom.Element{
sequenceElement,
element_1,
},
}
for _, v := range ds.Elements {
data, _ := v.Value.MarshalJSON()
fmt.Println(string(data))
}
}
`
The below is log
[[null,null]] ["SR"]
System: MacOS 14.4.1
Go Version: 1.21.1
IDE: vscode
The text was updated successfully, but these errors were encountered: