BTW by some reason I wasn’t able to apply “imwrite” function, got “not defined” error.
Not quite sure what you mean exactly, but FYI other readers like ImageMagick use load and save for image I/O, as defined by the FileIO.jl package. I’m not aware of a definition for imwrite.
I now have acceptable route for OPT images’ processing, that combines several ideas advised by the community:
“load” - from Julia
reading angles metadata from Bioformats accessed via JavaCall, using XML for parsing
… reconstructing …
“save” - also from Julia
(code is below)
There is one mysterious thing that is still unsolved.
It isn’t likely to be major, but anyway.
I specify for “save” procedure explicitly that it should interpret the reconstruction (3D stack of images) as XYZ but not XYT.
When I load the saved tiff image to ImageJ, I can see that it is XYZ.
However, when I open the same image via another app that uses Bioformats , e.g. Icy, it interprets this image as XYT.
Maybe someone has an idea how to fix this?
# get angles
r = bfGetReader(src_img_filename)
angles = bfGetModulo(r,"Z")
jcall(r, "close", Void, ())
# get projections
proj = convert(Array{Float64,3},load(src_img_filename))
# ..do reconstruction using "proj" and "angles"
save(dst_img_filename,
colorview(Gray,AxisArray(normedview(convert(Array{Normed{UInt16,16},3},reconstruction)),:x,:y,:z)))