QUERY_DICOM crashes on DICOMDIR [message #92537] |
Thu, 07 January 2016 22:56  |
LNpellen
Messages: 37 Registered: November 2009
|
Member |
|
|
I have a code searching for DICOM files in a folder. If this folder contains the DICOMDIR IDL reports a fatal error and crashes on QUERY_DICOM. For now I exclued files named 'DICOMDIR', but I'm not sure that will always be the full name of these files. Any idea why QUERY_DICOM crashes on DICOMDIR or how I can avoid it in a more robust way than filename-match?
Best regards
Ellen
|
|
|
Re: QUERY_DICOM crashes on DICOMDIR [message #92545 is a reply to message #92537] |
Sun, 10 January 2016 11:12   |
skymaxwell@gmail.com
Messages: 127 Registered: January 2007
|
Senior Member |
|
|
пятница, 8 января 2016 г., 9:56:18 UTC+3 пользователь LNpellen написал:
> I have a code searching for DICOM files in a folder. If this folder contains the DICOMDIR IDL reports a fatal error and crashes on QUERY_DICOM. For now I exclued files named 'DICOMDIR', but I'm not sure that will always be the full name of these files. Any idea why QUERY_DICOM crashes on DICOMDIR or how I can avoid it in a more robust way than filename-match?
>
> Best regards
> Ellen
Hi. I looked at help of Query_dicom. So Query_dicom is wrote IDL and placed in IDL LIB folder. There are some comments in IDL code. I put here the fragment
;; verify that the file exists
IF ~file_test(file) THEN return, 0l
;; DICOM has a fatal error in accessing zero-length files
;; Avoid the problem by checking in advance
OPENR, unit, file, /get_lun
stat = FSTAT(unit)
FREE_LUN, unit
IF (stat.size EQ 0) THEN RETURN, 0L
So DICOM has a fatal error in accessing zero-length files, may be it's your case ?
|
|
|
Re: QUERY_DICOM crashes on DICOMDIR [message #92597 is a reply to message #92537] |
Wed, 20 January 2016 03:05  |
LNpellen
Messages: 37 Registered: November 2009
|
Member |
|
|
FSTAT for the DICOMDIR file:
UNIT LONG 100
NAME STRING 'I:\.....\DICOMDIR'
OPEN BOOLEAN true (1)
ISATTY BOOLEAN false (0)
ISAGUI BOOLEAN false (0)
INTERACTIVE BOOLEAN false (0)
XDR BOOLEAN false (0)
COMPRESS BOOLEAN false (0)
READ BOOLEAN true (1)
WRITE BOOLEAN false (0)
ATIME LONG64 1420792259
CTIME LONG64 1420792257
MTIME LONG64 1420792259
TRANSFER_COUNT LONG 0
CUR_PTR LONG 0
SIZE LONG 1329592
REC_LEN LONG 0
The size is not zero. And all the other parameters have the same true/false and 0 vs non_zero values.
|
|
|