You can use Sequences extension’s recording capability for creating time sequences in real-time. We use it extensively for recording and replaying ultrasound images and tool positions in real-time.
All you need to do is to create a volume node, set it as a proxy node in “Sequence browser” module, and start recording. If you update the volume node, the new item will be automatically added to the sequence. You can start/stop recording, replay, save to nrrd or mkv file, etc. Compressed video streams are supported, too.
Note that Slicer can already receive images, transforms, models, points, strings, etc. through OpenIGTLink, a very simple socket-based protocol. If you choose this protocol then you don’t need to implement anything, you can already receive, display, record, replay, save real-time image and other data (using SlicerOpenIGTLink, SlicerIGSIO, and SlicerIGT modules).
Plus toolkit can connect to a wide range of devices and send data through OpenIGTLink protocol to Slicer. So, maybe a solution is already available for your needs. What kind of images do you receive, from what device?