File tree 2 files changed +8
-19
lines changed
2 files changed +8
-19
lines changed Original file line number Diff line number Diff line change @@ -131,21 +131,10 @@ always_implicit(grp, elt) =
131
131
132
132
function find_dicom_files (dir)
133
133
files = joinpath .(dir, readdir (dir))
134
- dicom_files = []
135
- # for file in 1:length(files)
136
- # if isdicom(file)
137
- # push!(dicom_files, file)
138
- # end
139
- # end
140
134
dicom_files = filter (file -> isdicom (file), files)
141
135
return dicom_files
142
136
end
143
137
144
- # function isdicom(file)
145
- # bytes = read(file, 132)[end-3:end]
146
- # String(bytes) == "DICM"
147
- # end
148
-
149
138
function isdicom (file)
150
139
try
151
140
bytes = read (file, 132 )[end - 3 : end ]
Original file line number Diff line number Diff line change @@ -232,14 +232,14 @@ end
232
232
@test length (dcms) == length (readdir (data_folder)) - 3 # -3 because of note above
233
233
end
234
234
235
- # @testset "isdicom" begin
236
- # answer = DICOM.isdicom("test/testdata/brain.bmp")
237
- # @test answer === nothing
238
-
239
- # fileDX = download_dicom("DX_Implicit_Little_Interleaved.dcm")
240
- # answer2 = DICOM.isdicom(fileDX)
241
- # @test answer2 == true
242
- # end
235
+ @testset " isdicom" begin
236
+ answer = DICOM. isdicom (" test/testdata/brain.bmp" )
237
+ @test answer === false
238
+
239
+ fileDX = download_dicom (" DX_Implicit_Little_Interleaved.dcm" )
240
+ answer2 = DICOM. isdicom (fileDX)
241
+ @test answer2 == true
242
+ end
243
243
244
244
@testset " Test tag macro" begin
245
245
@test tag " Modality" === (0x0008 , 0x0060 ) === DICOM. fieldname_dict[:Modality ]
You can’t perform that action at this time.
0 commit comments