tomaroberts / nii2dcm

nii2dcm: NIfTI to DICOM creation with Python
Other
56 stars 14 forks source link

AttributeError using reference dicom #29

Open benduffy1 opened 10 months ago

benduffy1 commented 10 months ago

Thanks @tomaroberts for your great package - using the cli if I add a reference image i get:

"/dcm_writer.py", line 89, in transfer_ref_dicom_series_tags for current_attribute in dcm.attributes_to_transfer:
AttributeError: 'Dicom' object has no attribute 'attributes_to_transfer'
tomaroberts commented 10 months ago

@benduffy1 – thanks for raising issue. This is fairly recent addition to nii2dcm, so not widely tested.

Can you tell me exactly what line in Terminal you ran to get this error?

Also, is it possible to share your NIfTI and DICOM files? If not, can you tell me if the reference DICOM file is single-frame or multi-frame?

Cheers!

Astrostellar commented 6 months ago

Same issue. Traceback (most recent call last): File "/home/songzhiyun/software/anaconda3/envs/cmsr/bin/nii2dcm", line 8, in <module> sys.exit(cli()) File "/home/songzhiyun/software/anaconda3/envs/cmsr/lib/python3.8/site-packages/nii2dcm/__main__.py", line 59, in cli run_nii2dcm( File "/home/songzhiyun/software/anaconda3/envs/cmsr/lib/python3.8/site-packages/nii2dcm/run.py", line 66, in run_nii2dcm transfer_ref_dicom_series_tags(dicom, ref_dicom) File "/home/songzhiyun/software/anaconda3/envs/cmsr/lib/python3.8/site-packages/nii2dcm/dcm_writer.py", line 89, in transfer_ref_dicom_series_tags for current_attribute in dcm.attributes_to_transfer: AttributeError: 'Dicom' object has no attribute 'attributes_to_transfer' Tested for multi-frame DICOM file

tomaroberts commented 6 months ago

@Astrostellar – thanks for raising the issue. Any chance you are able to share the DICOM so I can test?