slice spacing in fluoroscopic angiography

Operating system: Ubuntu 22.04.2 LTS
Slicer version:5.2.2
Expected behavior: There is an image spacing warning on DICOM load of a fluoroscopic angiogram. Expect an edit of image spacing in the Volumes module to be sustained at least for the session.
Actual behavior: After one or two clicks on the image panes the image spacing reverts to the wrong initial one. How to make an image spacing correction be retained?

Slicer loads fluoroscopy images are time sequences: each timepoint is a separate image. You can apply a transform to change the physical scale of the entire sequence at once.

You could change the spacing of all images in the series by a few Python commands. However, what we see is that if someone uses Slicer (and not a basic 2D viewer) then fluoro images end up fused with 3D images, and then changing the pixel spacing is insufficient, but you need to compute a full projection transform.

What do you do with fluoro images in Slicer? Do you do just basic 2D visualization and measurements or you fuse them with 3D?

Thank you — this gives me good reason to learn the Slicer-python interface. Any pointers on the precise python lines to apply the code? I wish to perform image by image segmentation and measurement then aggregate the frame-wise result into 2DxT ~ 3D-ish.

Something like this should work:

volumeSequenceNode = slicer.mrmlScene.GetFirstNodeByClass("vtkMRMLSequenceNode")

# Modify spacing in all nodes in the sequence
for volumeIndex in range(volumeSequenceNode.GetNumberOfDataNodes()):
    volumeNode = volumeSequenceNode.GetNthDataNode(volumeIndex)
    volumeNode.SetSpacing(2.0, 2.5, 1.4)

# Force update of volume node from sequence
sequenceLogic = slicer.modules.sequences.logic()
volumeSequenceBrowserNode = sequenceLogic.GetFirstBrowserNodeForSequenceNode(volumeSequenceNode)
sequenceLogic.UpdateProxyNodesFromSequences(volumeSequenceBrowserNode)

You can find more examples in the script repository.

To get started with Python scripting in Slicer, I would recommend the PerkLab Bootcamp Slicer programming tutorial.

Thanks for the link, you made my day.

1 Like

Agree, great answer by lassoan, thank you.

2 Likes

Yeah, I am glad I found this post.