Batch editing of 3DAngio CBCT slice thickness dicom tag

Hello, we have a cbct slices from a 3d angiography system but all the slices have the same slice location. Is there a way to batch process and edit the slice location in Slicer? there are 512 images and the location would be incremented by 0.3mm. Thank you for the information.

There is no need to edit slice thickness or slice location tags. These tags must not be taken into account for reconstructing a 3D volume from slices. Only “image position patient” and “image orientation patient” tags matter.

If the tags are missing then it may be because the image is not intended for 3D reconstruction (you could have a look if tyou can export the image in a different way) or the image could have been corrupted by some post-processing (e.g., anonymization or processing in some other software; you can try skipping these steps to confirm that this is the issue).

Thank you for the reply!

Yes we have both of the tags you mentioned

(0020,0032) Image Position Patient DS 3 String [0.0, 0.0, 0.0]
(0020,0037) Image Orientation Patient DS 6 String [1.0, 0.0, 0.0, 0.0, 1.0, 0.0]

The original files are taken from an older 3d angio system. The current software version does not prepare 3d ct volumes which we would like to use for aiding with contouring in avm cases. It only puts out ‘photos’ or screencaptures of the 3d volume slices. But the manufacturer was able to give us the raw 512 image slice set.

But each individual slice/file has the exact same ‘location’ in the ‘z’ value. I thought this would be the issue for our TPS not being able to construct a 3d volume from the series.

Do you have any suggestion on how we would be able to produce a 3d ct set from these slices?

Thanks for any info you have.

You can use the DICOM patcher in Slicer for setting Image Position Patient values if you know the spacing. You may be able to use the “Generate slice position for multi-frame volumes” rule or create a new rule similat to it:

Thank you, I will try this out.

1 Like

Hello,

I ran the dicom patch and loaded my files into Slicer. But how do I batch edit the location or patient position? The slice thickness would 0.3mm. Is this possible with slicer?

Thanks for the help and info,
Russell

Yes, sure, it should be no problem to update slice positions in Slicer. You can see that there is already a rule that can update slice positions for certain images. You can slightly tune this rule or create a new rule to process your data. You can simply edit the DICOMPatcher.py file in a text editor and click “Reload” button in the module GUI.

Hi Andre,

Thanks for the help. Apologies for the silly questions… I’m an end user and not really a programmer so I’m not really sure where I can edit this in the code.

But would I be able to simply change this to 0.3mm here (red arrow)?

Thanks again,
Russell

Yes, you need to set the desired slice spacing. There are a few other small things to check. For example, make sure that the plugin accepts your DICOM image (if not then you can edit the list of accepted SOPClassUIDs).

I would recommend to step through the code using a Python debugger so that you can make sure that it does what you want.