JuliaHealth / DICOM.jl

Julia package for reading and writing DICOM (Digital Imaging and Communications in Medicine) files
MIT License
56 stars 21 forks source link

dcm_write needs aux_vr = dcm_data.vr to function properly, at least on all my dicom files! #93

Open curtcorum opened 1 month ago

curtcorum commented 1 month ago

Thanks to the developers for DICOM.jl package!

I noticed that I needed the following to get valid modified dicom files.

Julia 1.10.4, Ubuntu 20.04, and latest DICOM.jl

dcm_write( file_name, dcm_data) results in an invalid dicom file. dcm_data is read first via dcm_parse and then has the SeriesDescription tag modified.

dcm_write( file_name, dcm_data, aux_vr = dcm_data.vr) works great!

My guess would be that dcm_write would use dcm_data.vr as the default and override only if the aux_vr argument is given?

Anyway, I have not looked at the code. Was this changed by #85 or #87 somehow?

If there is reason for not having the above expected default behavior it might be noted that dcm_write( file_name, dcm_data, aux_vr = dcm_data.vr) for some (all?) files in the docstring, etc.

curtcorum commented 1 month ago

Apologies if already fixed, I am using:

pkgversion( DICOM)
v"0.11.0"