tlnagy / OMETIFF.jl

I/O operations for OME-TIFF files in Julia
Other
24 stars 7 forks source link

EzXML error when trying to load ome.tiff #112

Open elmbeech opened 2 months ago

elmbeech commented 2 months ago

hi Tamas,

I try to load an ome.tiff file I generated with aicsimageio OmeTiffWriter, which is quite the standard library to deal with ome.tiff files in python.

I run into the following error:

julia> ometiff = load("output/output00000021_ID.ome.tiff")
Error encountered while load File{DataFormat{:OMETIFF}, String}("output/output00000021_ID.ome.tiff").

Fatal error:
ERROR: MethodError: no method matching nodecontent(::Nothing)

Closest candidates are:
  nodecontent(::EzXML.StreamReader)
   @ EzXML ~/.julia/packages/EzXML/DL8na/src/streamreader.jl:293
  nodecontent(::EzXML.Node)
   @ EzXML ~/.julia/packages/EzXML/DL8na/src/node.jl:1130

Stacktrace:
  [1] load_master_xml(file::TiffImages.TiffFile{UInt32, Stream{DataFormat{:OMETIFF}, IOStream, String}})
    @ OMETIFF ~/.julia/packages/OMETIFF/Jsw4Z/src/files.jl:122
  [2] load(io::Stream{DataFormat{:OMETIFF}, IOStream, String}; dropunused::Bool, verbose::Bool, inmemory::Bool)
    @ OMETIFF ~/.julia/packages/OMETIFF/Jsw4Z/src/loader.jl:34
  [3] load
    @ ~/.julia/packages/OMETIFF/Jsw4Z/src/loader.jl:29 [inlined]
  [4] #33
    @ ~/.julia/packages/OMETIFF/Jsw4Z/src/loader.jl:3 [inlined]
  [5] open(f::OMETIFF.var"#33#34"{Bool, Bool}, args::File{DataFormat{:OMETIFF}, String}; kwargs::@Kwargs{})
    @ Base ./io.jl:396
  [6] open
    @ ./io.jl:393 [inlined]
  [7] #load#32
    @ ~/.julia/packages/OMETIFF/Jsw4Z/src/loader.jl:2 [inlined]
  [8] load(f::File{DataFormat{:OMETIFF}, String})
    @ OMETIFF ~/.julia/packages/OMETIFF/Jsw4Z/src/loader.jl:1
  [9] #invokelatest#2
    @ ./essentials.jl:892 [inlined]
 [10] invokelatest
    @ ./essentials.jl:889 [inlined]
 [11] action(::Symbol, ::Vector{Union{Base.PkgId, Module}}, ::Formatted; options::@Kwargs{})
    @ FileIO ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:219
 [12] action
    @ ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:196 [inlined]
 [13] action
    @ ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:185 [inlined]
 [14] load(::String; options::@Kwargs{})
    @ FileIO ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:113
 [15] load(::String)
    @ FileIO ~/.julia/packages/FileIO/xOKyx/src/loadsave.jl:109
 [16] top-level scope
    @ REPL[70]:1
Stacktrace:
 [1] handle_error(e::MethodError, 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[70]:1

I can load this ometiff with napari and fiji imagej. Could you please help me that this file loads in Julia too?

output00000021_ID.ome.tiff.txt An example ome.tiff file is attached. I had to add .txt extension at the end, that I could upload the file.

Thank you, Elmar