Why I can not import DICOM?

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.

  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

Sorry, where to get the DICOM patcher module?

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

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

What device was used to acquire the image?

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

escribió:

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)

[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

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.

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.

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

1 Like

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

I have the same problem. After changing the folder name from Chinese to English, this problem was fixed.

Starting from today, Slicer Preview Release (revision 28783) should be able to import DICOM files from any folder. See announcement and more details here: Special characters in filenames and strings are now allowed

It is all very new and probably it will take a while to get all problems ironed out, but it should work.

1 Like

Hi. I also have an internal error while loading dicom
The message detail is:
Exception thrown in event: calling methods on uninitialized ctkDICOMItem

Any suggestions? Thanks

Could you please try with the latest Slicer Preview Release?

I am facing a similar problem importing DICOM files. The message displayed is import completed: 0 patients, 0 studies. I tried installing quantitative reporting as well as copying the images to another folder but both don’t seem to be working. Even DICOM patcher is not solving the issue at hand. How can I load the images?

Please follow these instructions.

Hi, I had a similar problem (imported 0 new patient, 0 new studies) but copying/pasting all the dcm files in a new folder seems to have solved the issue. I can’t share the log because it shows the patient’s name in some places but I’ll gladly provide more info if needed.

1 Like