Need help on changing dicom modality

Hello,

As per my use case, I want to change the modality of DICOM data when importing a DICOM directory, so that when viewing the DICOM metadata, it reflects the changes I made.

Can anyone please help me achieve this?

You can write a simple pydicom script to do this, but it’s not avalable in the GUI of Slicer.

@pieper @lassoan

Could you please show me how to directly change it through the code during the import operation? Also, I want to perform this in C++. Could you please guide me in which file should I make changes?

Thanks for any help.

Chaning the modality is a very unusual action. Can you describe why you need to do it?

I would suggest doing this in a separate pass, not part of the dicom import operation. You can find lots of examples in C++ using dcmtk, gdcm, or other toolkits. But python would be a lot easier.

1 Like