ImageIO from string/buffer

I have an NRRD image that is embedded inside another file as a string. Of course I can extract it, write to a file, then use the usual ImageFileReader interface, but that’s wasteful as I already have the object in memory.

I seem to remember an effort a while ago to add IO from a stream to these classes, but cant’ find that now. Any pointers/ideas as to the easiest way to do this? I’m trying to avoid duplicating most of the functionality of NrrdImageIO … perhaps I’m just missing something easy (itk 4.10.x )

I also vaguely remember such a discussion, but in my memory the conclusion was that ITK does not provide a mechanism to read an image from memory instead of from disk.

Is this the discussion, or was there another one?

Ah, here is an even earlier discussion. The answer seems to be to use itkFileFreeImageIO.h

Thanks Dženan. I think that second link is the one I was looking for. I’ll dig around in both !