Skip to content

Commit e4bd65c

Browse files
committed
Corrections mineures
1 parent ee8c56f commit e4bd65c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/DICOMTree.jl

+8-8
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,14 @@ function Tree(
7979

8080
function format(x::AbstractArray, md)::Tree
8181
return (Tree(Dict("Size" => string(size(x)), "Type" => typeof(x)),
82-
with_keys=with_keys,
8382
guides=guides,
8483
title="Array",
8584
maxdepth=md))
8685
end
8786

8887
function format(x::Vector, md)::Tree
8988
if length(x) <= 6
90-
return Tree(string(x), with_keys=with_keys, guides=guides)
89+
return Tree(string(x), guides=guides)
9190
else
9291
return Tree(Dict("Length" => length(x),
9392
"ElementsType" => eltype(x),
@@ -96,14 +95,14 @@ function Tree(
9695
end
9796

9897
function format(x::DICOM.DICOMData, md)::Tree
99-
return Tree(x.meta, with_keys=with_keys, guides=guides, title="", maxdepth=md)
98+
return Tree(x.meta, guides=guides, title="", maxdepth=md)
10099
end
101100

102101
function format(x::Vector{DICOM.DICOMData}, md)::Tree
103102
if md >= 2
104-
return Tree(Tree.(x, with_keys=with_keys, guides=guides, title="", maxdepth=md), with_keys=with_keys, guides=guides, title="", maxdepth=md)
103+
return Tree(Tree.(x, with_keys=with_keys, guides=guides, title="", maxdepth=md), guides=guides, title="", maxdepth=md)
105104
else
106-
return Tree(Dict("Length" => length(keys(x))), with_keys=with_keys, guides=guides, title="Vector of DICOMData", maxdepth=md)
105+
return Tree(Dict("Length" => length(keys(x))), guides=guides, title="Vector of DICOMData", maxdepth=md)
107106
end
108107
end
109108

@@ -115,7 +114,8 @@ function Tree(
115114
tree[symbol] = format(dicom[symbol], md - 1)
116115
end
117116
else
118-
for symbol in get_name_from_tag.(keys(dicom.meta))
117+
tag_names = get_name_from_tag.(keys(dicom.meta))
118+
for symbol in tag_names
119119
tree[symbol] = format(dicom[symbol], md - 1)
120120
end
121121
end
@@ -126,7 +126,7 @@ function Tree(
126126
title = ""
127127
end
128128

129-
return Tree(tree, with_keys=with_keys, guides=guides, title=title, maxdepth=md - 1)
129+
return Tree(tree, guides=guides, title=title, maxdepth=md - 1)
130130

131131
end
132132

@@ -143,7 +143,7 @@ function Tree(
143143
kwargs...
144144
)
145145
md = haskey(kwargs, :maxdepth) ? kwargs[:maxdepth] : 2
146-
return Tree(Tree.(dicom_vector, with_keys=with_keys, guides=guides, title="", maxdepth=md), with_keys=with_keys, guides=guides, title="", maxdepth=md)
146+
return Tree(Tree.(dicom_vector, with_keys=with_keys, guides=guides, title="", maxdepth=md), guides=guides, title="", maxdepth=md)
147147
end
148148

149149
end

0 commit comments

Comments
 (0)