Why I can not import DICOM?

#1

I try to import a series of DICOM data, but fail.
It shows 0 new patients, 0 studies, …
However, others can import the series with MIMICs.

(Andras Lasso) #2
  1. Use the latest nightly version of Slicer.
  2. Use DICOM Patcher module to fix the DICOM files: Set the input directory to the location where your DICOM files are stored, set the output directory to another directory where the fixed, valid DICOM files will be stored (make sure the directory path doesn’t contain any special characters), click Patch, click Import, and then load the data using the DICOM module.
1 Like
#3

Sorry, where to get the DICOM patcher module?

(Andras Lasso) #4

It’s in Slicer, in the module list, Utilities category.

(Leandro) #5

I am having the same problem. No way to fix it so far. Tried Nightly version as well as DICOM patcher with no success.

(Andras Lasso) #6

What device was used to acquire the image?

(Leandro) #7

GE Discovery 750 3T magnet. Ive tríed with MRIs from the Cancer Archive
Imaging as …well

escribió:

(Andras Lasso) #8

Great, this is very useful information. Most likely your DICOM database directory is not set correctly. To confirm this, could you copy-paste here the application log of a failed DICOM import? (log is available in menu: Help / Report a bug)

(Leandro) #9

[WARNING][Python] 16.01.2018 22:52:33 [Python] (/private/var/folders/wm/7t6787qs7kb8fp5d8vjlvrnw0000gn/T/AppTranslocation/207F0FF5-0744-420D-8978-17417221E506/d/Slicer.app/Contents/bin/Python/slicer/util.py:955) - The database file path “/Users/leacarballo/Documents/SlicerDICOMDatabase/ctkDICOM.sql” cannot be used. Directory is not empty and not an existing DICOM database.
Please pick a different database directory using the LocalDatabase button in the DICOM Browser
[DEBUG][Qt] 16.01.2018 22:52:33 [] (unknown:0) - Switch to module: “DICOM”
[CRITICAL][Stream] 16.01.2018 22:52:33 [] (unknown:0) - The database file path “/Users/leacarballo/Documents/SlicerDICOMDatabase/ctkDICOM.sql” cannot be used. Directory is not empty and not an existing DICOM database.
[CRITICAL][Stream] 16.01.2018 22:52:33 [] (unknown:0) - Please pick a different database directory using the LocalDatabase button in the DICOM Browser
[CRITICAL][FD] 16.01.2018 22:52:41 [] (unknown:0) - 2018-01-16 22:52:41.135 Slicer[593:70579] modalSession has been exited prematurely - check for a reentrant call to endModalSession:
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[DEBUG][Qt] 16.01.2018 22:52:41 [] (unknown:0) - SQL failed
Bad SQL: SELECT Version from SchemaInfo;
[DEBUG][Qt] 16.01.2018 22:52:41 [] (unknown:0) - Error text:
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[DEBUG][Qt] 16.01.2018 22:52:41 [] (unknown:0) - SQL failed
Bad SQL: CREATE TABLE IF NOT EXISTS main.Filenames_backup (Filename TEXT PRIMARY KEY NOT NULL )
[DEBUG][Qt] 16.01.2018 22:52:41 [] (unknown:0) - Error text:
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[DEBUG][Qt] 16.01.2018 22:52:41 [] (unknown:0) - SQL failed
Bad SQL: INSERT INTO Filenames_backup SELECT Filename FROM Images;
[DEBUG][Qt] 16.01.2018 22:52:41 [] (unknown:0) - Error text:
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[DEBUG][Qt] 16.01.2018 22:52:41 [] (unknown:0) - SQL failed
Bad SQL: DROP TABLE IF EXISTS ‘SchemaInfo’;
[DEBUG][Qt] 16.01.2018 22:52:41 [] (unknown:0) - Error text:
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[DEBUG][Qt] 16.01.2018 22:52:41 [] (unknown:0) - SQL failed
Bad SQL: SELECT Filename from Filenames_backup ;
[DEBUG][Qt] 16.01.2018 22:52:41 [] (unknown:0) - Error text:
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::exec: database not open
[DEBUG][Qt] 16.01.2018 22:52:41 [] (unknown:0) - SQL failed
Bad SQL: DROP TABLE main.Filenames_backup;
[DEBUG][Qt] 16.01.2018 22:52:41 [] (unknown:0) - Error text:
[WARNING][Qt] 16.01.2018 22:52:41 [] (unknown:0) - QSqlQuery::prepare: database not open
[WARNING][Qt] 16.01.2018 22:52:58 [] (unknown:0) - QSqlQuery::prepare: database not open
[DEBUG][Qt] 16.01.2018 22:52:58 [] (unknown:0) - SQL failed
Bad SQL:
[DEBUG][Qt] 16.01.2018 22:52:58 [] (unknown:0) - Error text: Parameter count mismatch
[WARNING][Qt] 16.01.2018 22:52:58 [] (unknown:0) - QSqlQuery::prepare: database not open
[CRITICAL][Qt] 16.01.2018 22:52:58 [] (unknown:0) - SQLITE ERROR: Parameter count mismatch
[WARNING][Qt] 16.01.2018 22:52:58 [] (unknown:0) - QSqlQuery::prepare: database not open
[DEBUG][Qt] 16.01.2018 22:52:58 [] (unknown:0) - SQL failed

(Andras Lasso) #10

This log message describes the problem and suggested solution:

Please set an empty folder for DICOM database that you have write access to, try DICOM import again, and let us know if it fixed the DICOM importing.

DICOM import fails - 0 New Patients
Add DATA - does not load
(Timeanddoctor) #11

If the system language is Chinese, the folder name of DICOM files should be named by English.
I think this problem will be fixed in the futrue.

(Leandro) #12

Thank you Andras, you were right…it was the DICOM database directory indeed. I appreciate your help.

1 Like
(Syed Faiz Ali) #13

Simply, just copy/cut the dcm file folder to some other location. It will work just fine… it did work fine in my case.