Using getImageCropped function in PyAutoscoper. Getting truncated/empty data

I’m trying to use getImageCropped from PyAutoscoper to extract the cropped DRR image of a volume at a given pose. My setup works fine otherwise – getPose, getNCC, optimizeFrame, and trackingDialog all work correctly. This is the output i am getting:

The width and height (1760x1760) look correct, but the byte array is only 1015 bytes long and entirely zeros. For a 1760x1760 image I’d expect significantly more data.

  1. What is getImageCropped supposed to return exactly? The docstring says list[float] but it actually returns [width, height, raw_bytes]. What format/dtype is the image data (float32, uint8, RGB, grayscale)?
  2. Is there another recommended way to programmatically extract DRR or radiograph images from Autoscoper?

Thanks for the help!

Hi Prabhroop,

My experience with using socket controls for SlicerAutoscoper has been limited to Matlab. I don’t believe there is an equivalent function, so I can’t answer your questions presently. However, this is something I can look into and get back to you on.

Thank you,

John