Closed jowch closed 2 years ago
This is a little difficult to diagnose from that error message. What does
julia> OMETIFF.dump_omexml(stack_path)
give you? Also, could you try opening the TIFF file with https://github.com/tlnagy/TiffImages.jl?
julia> TiffImages.load(stack_path; mmap=true)
Does that work?
I have attached the XML dump (44MB inflated) here: ome-xml.tar.gz
When I use TiffImages.load
it only loads the first part of the whole stack. The whole stack is massive (100GB) so memory mapping will be key.
TiffImages should memory map (with the mmap=true
flag) it properly if it's a BigTIFF. If it's lots of separate 4GB ome.tif files than it doesn't have logic to handle the splits since that's contained in the OME data. Then it's better to stick to OMETIFF.jl
.
As for diagnosing the problem, the only thing I can suggest is to copy paste line by line from the OMETIFF.load
function into your REPL starting here https://github.com/tlnagy/OMETIFF.jl/blob/6f3555e25637ac71ce3d7f39e810e16ddb3f86c6/src/loader.jl#L33 and let me know where it crashes for you and what the output is prior.
Thanks for helping me diagnose this. Hopefully we can get to the bottom of it.
I looks like its dying on the initial io open call before the OMETIFF function is run. The snippet below is from Base.io. Doesn't seem like this is an issue with OMETIFF.
function open(f::Function, args...; kwargs...)
io = open(args...; kwargs...)
try
f(io)
finally
close(io)
end
end
That's weird given that both TiffImages.jl
and OMETIFF.dump_omexml
are able to open the file?
Given that this appears to not be a OMETIFF.jl error, I'm going to go ahead and close this.
Hello, I have some large micromanager tiff stacks (50000+ images) that I would like to load as a memory-mapped stack. I get a ReadOnlyMemoryError when I run the following code.
Additionally, when I use FileIO directly, I get
I would provide an example file but it is quite large. Perhaps there is a good way to deal with this? I can help investigate this as well.
Any pointers would be much appreciated.
PS: This image stack was also from an aborted acquisition, but I saw an earlier closed issue that dealt with that so its probably not related (?).