Open mdhe1248 opened 10 months ago
TiffImages.jl
package opened the file without an error, although the axis information is missing.
OMETIFF
uses TiffImages.jl
as its engine so it must be an OMEXML-related issue. Do you mind sharing a minimal image that can reproduce this? You can either upload here or email it to the email address on my profile.
I will come back with a sample image in a few days...
Bump. Are you still running into this issue?
Oh, Sorry. I have been preoccupied with other stuff. I will close it for now and open it with an example image if I encounter this issue again.
I have also been working on a Zeiss setup recently and can't open the files. If I first open them in FIJI and export them to OME-TIFF then they seem to work. I cannot access this system anymore so I can't get lightweight images to reproduce the error, but I'm willing to share one of the stacks I have (~5 GB) if it helps to identify the issue.
EDIT: Whether they open or not after the FIJI export seems to be random, but the error is different. E.g., if I open it, slice it down (in this case taking only 5 frames) and export it, then I get indexing issues:
Fatal error:
ERROR: BoundsError: attempt to access 5-element Vector{Unitful.Quantity{Float64, 𝐓, Unitful.FreeUnits{(s,), 𝐓, nothing}}} at index [6]
Stacktrace:
[1] setindex!(A::Vector{Unitful.Quantity{…}}, x::Unitful.Quantity{Float64, 𝐓, Unitful.FreeUnits{…}}, i1::Int64)
@ Base ./array.jl:1021
[2] get_elapsed_times(containers::Vector{…}, master_dims::@NamedTuple{…}, masteraxis::Vector{…}; default_unit::Unitful.FreeUnits{…})
@ OMETIFF ~/.julia/packages/OMETIFF/Jsw4Z/src/parsing.jl:235
[3] get_elapsed_times(containers::Vector{…}, master_dims::@NamedTuple{…}, masteraxis::Vector{…})
@ OMETIFF ~/.julia/packages/OMETIFF/Jsw4Z/src/parsing.jl:202
[4] load(io::Stream{DataFormat{:OMETIFF}, IOStream, String}; dropunused::Bool, verbose::Bool, inmemory::Bool)
@ OMETIFF ~/.julia/packages/OMETIFF/Jsw4Z/src/loader.jl:87
[5] load
@ ~/.julia/packages/OMETIFF/Jsw4Z/src/loader.jl:29 [inlined]
[6] #33
@ ~/.julia/packages/OMETIFF/Jsw4Z/src/loader.jl:3 [inlined]
[7] open(f::OMETIFF.var"#33#34"{Bool, Bool}, args::File{DataFormat{:OMETIFF}, String}; kwargs::@Kwargs{})
@ Base ./io.jl:396
[8] open
@ Base ./io.jl:393 [inlined]
[9] #load#32
@ OMETIFF ~/.julia/packages/OMETIFF/Jsw4Z/src/loader.jl:2 [inlined]
[10] load(f::File{DataFormat{:OMETIFF}, String})
@ OMETIFF ~/.julia/packages/OMETIFF/Jsw4Z/src/loader.jl:1
[11] #invokelatest#2
@ ./essentials.jl:887 [inlined]
[12] invokelatest
@ ./essentials.jl:884 [inlined]
[13] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::Formatted; options::@Kwargs{})
@ FileIO ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:219
[14] action
@ ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:196 [inlined]
[15] action
@ ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:185 [inlined]
[16] load(::String; options::@Kwargs{})
@ FileIO ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:113
[17] load(::String)
@ FileIO ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:109
[18] top-level scope
@ REPL[41]:1
Stacktrace:
[1] handle_error(e::BoundsError, q::Base.PkgId, bt::Vector{Union{Ptr{Nothing}, Base.InterpreterIP}})
@ FileIO ~/.julia/packages/FileIO/xOKyx/src/error_handling.jl:61
[2] handle_exceptions(exceptions::Vector{Tuple{Any, Union{Base.PkgId, Module}, Vector}}, action::String)
@ FileIO ~/.julia/packages/FileIO/xOKyx/src/error_handling.jl:56
[3] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::Formatted; options::@Kwargs{})
@ FileIO ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:228
[4] action
@ ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:196 [inlined]
[5] action
@ ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:185 [inlined]
[6] load(::String; options::@Kwargs{})
@ FileIO ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:113
[7] load(::String)
@ FileIO ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:109
[8] top-level scope
@ REPL[41]:1
I am having the same issue loading the tiff files.
Error encountered while load FileIO.File{FileIO.DataFormat{:OMETIFF}, String}("morphology_mip.ome.tif").
Fatal error: ERROR: LoadError: ArgumentError: collection must be non-empty Stacktrace: [1] first @ ./abstractarray.jl:473 [inlined] [2] inmemoryarray(ifds::OrderedCollections.OrderedDict{NTuple{4, Int64}, Tuple{TiffImages.TiffFile{UInt64}, TiffImages.IFD{UInt64}}}, dims::@NamedTuple{Y::Int64, X::Int64, Z::Int64, C::Int64, T::Int64, P::Int64}; verbose::Bool) @ OMETIFF ~/.julia/packages/OMETIFF/Jsw4Z/src/loader.jl:122 [3] load(io::FileIO.Stream{FileIO.DataFormat{:OMETIFF}, IOStream, String}; dropunused::Bool, verbose::Bool, inmemory::Bool) @ OMETIFF ~/.julia/packages/OMETIFF/Jsw4Z/src/loader.jl:90 [4] load @ ~/.julia/packages/OMETIFF/Jsw4Z/src/loader.jl:29 [inlined] [5] #33 @ ~/.julia/packages/OMETIFF/Jsw4Z/src/loader.jl:3 [inlined] [6] open(f::OMETIFF.var"#33#34"{Bool, Bool}, args::FileIO.File{FileIO.DataFormat{:OMETIFF}, String}; kwargs::@Kwargs{}) @ Base ./io.jl:396 [7] open @ ./io.jl:393 [inlined] [8] #load#32 @ ~/.julia/packages/OMETIFF/Jsw4Z/src/loader.jl:2 [inlined] [9] load(f::FileIO.File{FileIO.DataFormat{:OMETIFF}, String}) @ OMETIFF ~/.julia/packages/OMETIFF/Jsw4Z/src/loader.jl:1 [10] #invokelatest#2 @ ./essentials.jl:892 [inlined] [11] invokelatest @ ./essentials.jl:889 [inlined] [12] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::FileIO.Formatted; options::@Kwargs{}) @ FileIO ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:219 [13] action @ ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:196 [inlined] [14] action @ ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:185 [inlined] [15] load(::String; options::@Kwargs{}) @ FileIO ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:113 [16] load @ ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:109 [inlined] [17] load_segmentation_mask(path::String) @ Baysor.DataLoading ~/.julia/packages/Baysor/6dGr2/src/data_loading/prior_segmentation.jl:60 [18] load_prior_segmentation(file::String, pos_data::Matrix{Float64}; min_molecules_per_segment::Int64) @ Baysor.DataLoading ~/.julia/packages/Baysor/6dGr2/src/data_loading/cli_wrappers.jl:30 [19] load_prior_segmentation @ ~/.julia/packages/Baysor/6dGr2/src/data_loading/cli_wrappers.jl:27 [inlined] [20] load_prior_segmentation!(path::String, df_spatial::DataFrames.DataFrame, pos_data::Matrix{Float64}; min_molecules_per_segment::Int64, min_mols_per_cell::Int64) @ Baysor.DataLoading ~/.julia/packages/Baysor/6dGr2/src/data_loading/cli_wrappers.jl:218 [21] load_prior_segmentation!(df_spatial::DataFrames.DataFrame, prior_segmentation::String, opts::Baysor.Utils.SegmentationOptions; min_molecules_per_cell::Int64, min_molecules_per_segment::Int64, plot::Bool) @ Baysor.CommandLine ~/.julia/packages/Baysor/6dGr2/src/cli/main.jl:197 [22] run(coordinates::String, prior_segmentation::String; config::Baysor.Utils.RunOptions, x_column::String, y_column::String, z_column::String, gene_column::String, min_molecules_per_cell::Int64, scale::Float64, scale_std::String, n_clusters::Int64, prior_segmentation_confidence::Float64, output::String, plot::Bool, save_polygons::String, no_ncv_estimation::Bool, count_matrix_format::String) @ Baysor.CommandLine ~/.julia/packages/Baysor/6dGr2/src/cli/main.jl:108 [23] command_main(ARGS::Vector{String}) @ Baysor.CommandLine ~/.julia/packages/Comonicon/F3QqZ/src/codegen/julia.jl:343 [24] command_main() @ Baysor.CommandLine ~/.julia/packages/Comonicon/F3QqZ/src/codegen/julia.jl:90 [25] command_main(; kwargs::@Kwargs{}) @ Baysor ~/.julia/packages/Baysor/6dGr2/src/Baysor.jl:41 [26] top-level scope @ ~/.julia/bin/baysor:15 Stacktrace: [1] handle_error(e::ArgumentError, q::Base.PkgId, bt::Vector{Union{Ptr{Nothing}, Base.InterpreterIP}}) @ FileIO ~/.julia/packages/FileIO/xOKyx/src/error_handling.jl:61 [2] handle_exceptions(exceptions::Vector{Tuple{Any, Union{Base.PkgId, Module}, Vector}}, action::String) @ FileIO ~/.julia/packages/FileIO/xOKyx/src/error_handling.jl:56 [3] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::FileIO.Formatted; options::@Kwargs{}) @ FileIO ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:228 [4] action @ ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:196 [inlined] [5] action @ ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:185 [inlined] [6] load(::String; options::@Kwargs{}) @ FileIO ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:113 [7] load @ ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:109 [inlined] [8] load_segmentation_mask(path::String) @ Baysor.DataLoading ~/.julia/packages/Baysor/6dGr2/src/data_loading/prior_segmentation.jl:60 [9] load_prior_segmentation(file::String, pos_data::Matrix{Float64}; min_molecules_per_segment::Int64) @ Baysor.DataLoading ~/.julia/packages/Baysor/6dGr2/src/data_loading/cli_wrappers.jl:30 [10] load_prior_segmentation @ ~/.julia/packages/Baysor/6dGr2/src/data_loading/cli_wrappers.jl:27 [inlined] [11] load_prior_segmentation!(path::String, df_spatial::DataFrames.DataFrame, pos_data::Matrix{Float64}; min_molecules_per_segment::Int64, min_mols_per_cell::Int64) @ Baysor.DataLoading ~/.julia/packages/Baysor/6dGr2/src/data_loading/cli_wrappers.jl:218 [12] load_prior_segmentation!(df_spatial::DataFrames.DataFrame, prior_segmentation::String, opts::Baysor.Utils.SegmentationOptions; min_molecules_per_cell::Int64, min_molecules_per_segment::Int64, plot::Bool) @ Baysor.CommandLine ~/.julia/packages/Baysor/6dGr2/src/cli/main.jl:197 [13] run(coordinates::String, prior_segmentation::String; config::Baysor.Utils.RunOptions, x_column::String, y_column::String, z_column::String, gene_column::String, min_molecules_per_cell::Int64, scale::Float64, scale_std::String, n_clusters::Int64, prior_segmentation_confidence::Float64, output::String, plot::Bool, save_polygons::String, no_ncv_estimation::Bool, count_matrix_format::String) @ Baysor.CommandLine ~/.julia/packages/Baysor/6dGr2/src/cli/main.jl:108 [14] command_main(ARGS::Vector{String}) @ Baysor.CommandLine ~/.julia/packages/Comonicon/F3QqZ/src/codegen/julia.jl:343 [15] command_main() @ Baysor.CommandLine ~/.julia/packages/Comonicon/F3QqZ/src/codegen/julia.jl:90 [16] command_main(; kwargs::@Kwargs{}) @ Baysor ~/.julia/packages/Baysor/6dGr2/src/Baysor.jl:41 [17] top-level scope @ ~/.julia/bin/baysor:15 in expression starting at /home/nsoni/.julia/bin/baysor:15
Unfortunately, the error messages aren't super helpful here. Does anyone have a small-ish file (<100 MB) that reproduces this error that they can share with me?
Hi,
My images was acquired by a Zeiss confocal microscope and saved images as ome.tiff. When I tried to load the file in julia, I got this error:
Interestingly, I was able to load the same files in Fiji (but the pixel parameters were were not correct). I also checked the header file with
tiffcomment
command:Also I have the "original" czi file format. If I open it in fiji and store it as ome.tif, Julia could load the resulting ome.tif file. While I can convert all files in Fiji, I wanted to check if these is better ways to solve this issue.