Open caoshouse opened 2 years ago
Hello @caoshouse! Thank you for this PR!
I was wondering... is there any way to extract the datasetElements
information from dcmjs's dictionary?
I'm not a huge fan of keeping the same (and large) information twice.
Hello @PantelisGeorgiadis I just published a simple package here: https://www.npmjs.com/package/@caoshouse/dcmjs-dictionary It also generates a .d.ts file if needed
Anyway, I found the dictionary data here: dcmjs.data.DicomMetaDictionary.dictionary
Great work @caoshouse! So, if I understand correctly, there is no way to generate and use the types dynamically, right? We need to somehow (re)include the dictionary.
Maybe I will have a solution to automatically update definition files by grabbing data from nema website. Almost easy Probably Next week
Added DICOM VRs in order to easily get/set Dataset Elements (including sequences) For instance: ` new Dataset({fakeProperty:'anyValue}) // throws a tsc error
const ds=new Dataset({}) ds.setElement('PatientName',1234) // throws a tsc error
const ds=new Dataset({}) ds.setElement('PatientName','JOHN^DOE') // it works
const ds=new Dataset({}) ds.getElement('ReferencedImageSequence').push({...blahblah}) // it works
`