How to return PNG as an array instead of writing to file

Hi,

I’m trying to use ITK in conjunction with Unity. Currently, when my program is called from Unity, it reads a .mha + .raw 3D image file, applies two filters, and outputs a 2D PNG, which is written to another folder where Unity can make use of it. What I would like to do is circumvent having to write a PNG file that is immediately loaded back in. I am able to call my ITK program as a function in Unity, so I was hoping there was a way to return the PNG as an array instead of writing a file. This link from the mailing list is the closest I got to answering my question on my own, but the link to “Getting Started V: Integrating ITK in your Application” is dead.

You could look into FileFree ImageIO.

I think an updated link redirects here:

1 Like