Convert voxels to grayscale

Hey,
I am using
slicer.util.arrayFromVolume
to obtain an array of my slice widget view. However, the array contains voxel data, how can i convert that to RGB grayscale?

Thanks

I don’t know what you mean by “RGB grayscale”.

If your volume is a scalar volume (i.e., each voxel of the volume is a scalar, not a vector) then slicer.util.arrayFromVolume returns a 3D array.

If you want the displayed slice, with current window/level, opacity settings, all the overlays then you can get the 24-bit RGB image using Screen Capture module’s logic. This is intended for presentations, slide shows, etc., not for computation, because all the display settings (window/level, overlays, etc.) are burnt into the displayed image.

the screen capture module is what i needed!
Thanks!