Write op for spectral images

I’m working on a plugin which applies data analysis methods on spectral images but I’m not sure how should I proceed to do it.
I think I should use ImageStack or VirtualStack to store data (X rows, Y columns and Z wavelength) and deal with big images. Also, I think I should use op to write my data analysis operations but I don’t really understand what exactly I should extend and write to deal with images with multiple channels. How to deal with my problem ?

Thanks in advance.