How to correctly use vtkPixelBufferObject

Hi everyone,
I have recently been looking into using vtkPixelBufferObject to perform basic PBO,

  • bind
  • capture data
  • update
  • unbind

here’s what I’ve done thus far (if I’m correct)

  • a render window to be set as its context

  • I explicitly set the object’s size to match the total bytes required for the operations (this being the width x height) - not sure if its necessary to do this as I would assume since the object is bound to the window it ought to implicitly capture its dimension

  • a call to Allocate with the parameter total bytes as mentioned above and vtkPixelBufferObject::PACKED_BUFFER

    Now, this is where am stuck. I can’t seem to figure out how to read the necessary pixels from my context (render window). Does anyone have any experience using this class vtkPixelBufferObject or is there some sample code out there (can’t find any) that one can follow through, thanks.