Skip to content

Commit 9610f96

Browse files
authored
Merge pull request #78 from tlnagy/tn/fix-ezxml-warning
fix empty namespace warning
2 parents 8c79678 + e5916be commit 9610f96

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "OMETIFF"
22
uuid = "2d0ec36b-e807-5756-994b-45af29551fcf"
33
authors = ["Tamas Nagy <[email protected]>"]
4-
version = "0.3.9"
4+
version = "0.3.10"
55

66
[deps]
77
AxisArrays = "39de3d68-74b9-583c-8d2d-e117c070f3a9"

src/loader.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function load(io::Stream{format"OMETIFF"}; dropunused=true, inmemory=true)
3737
omexml = load_master_xml(orig_file)
3838

3939
# find all images in this dataset, can either have the Image or Pixel tag
40-
containers = findall("//*[@DimensionOrder]", omexml)
40+
containers = findall("//*[@DimensionOrder]", omexml, ["ns" => namespace(omexml)])
4141

4242
pos_names = nodecontent.(findall("/ns:OME/ns:Image/ns:StageLabel[@Name]/@Name", omexml, ["ns"=>namespace(omexml)]))
4343
# if all position names aren't unique then substitute names

test/runtests.jl

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ using FileIO
44
using Unitful
55
using AxisArrays
66
using Test
7+
using ImageMetadata
78

89
include("utils.jl")
910

@@ -88,7 +89,7 @@ end
8889
tiffslice = open("testdata/singles/181003_slices/P$(pos)_T$(tp).tif") do s
8990
FileIO.load(OMETIFF.getstream(format"TIFF", s))
9091
end
91-
omeslice = img[Axis{:position}(pos), Axis{:time}(tp+1)].data
92+
omeslice = arraydata(img[Axis{:position}(pos), Axis{:time}(tp+1)])
9293
# verify that ometiff slices are correctly indexed
9394
@testset "Testing P$(pos)_T$(tp).tif" begin
9495
@test all(omeslice .== tiffslice)
@@ -142,7 +143,7 @@ end
142143
FileIO.load(OMETIFF.getstream(format"TIFF", f))
143144
end
144145
# compare
145-
@test all(ome.data .== tiff)
146+
@test all(arraydata(ome) .== tiff)
146147
end
147148
end
148149

test/tiffdatas.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function get_ifds(fragment::String)
2424
end
2525

2626
function get_ifds(omexml::EzXML.Node)
27-
containers = findall("//*[@DimensionOrder]", omexml)
27+
containers = findall("//*[@DimensionOrder]", omexml, ["ns" => namespace(omexml)])
2828
dimlist = []
2929
for container in containers
3030
dims, _ = OMETIFF.build_axes(container)

0 commit comments

Comments
 (0)