Skip to content

Commit

Permalink
Merge pull request JuliaHealth#1 from Dale-Black/dale-fix
Browse files Browse the repository at this point in the history
fixed `isdicom`
  • Loading branch information
Dale-Black authored Nov 26, 2021
2 parents d1e5567 + 1987163 commit f8cb142
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/DICOM.jl
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,12 @@ function find_dicom_files(dir)
end

function isdicom(file)
bytes = read(file, 132)[end-3:end]
String(bytes) == "DICM"
try
bytes = read(file, 132)[end-3:end]
String(bytes) == "DICM"
catch
not_dicom == true
end
end

function dcmdir_parse(dir; kwargs...)
Expand Down

0 comments on commit f8cb142

Please sign in to comment.