parameters: (dicomDataDir, dicomDatabase=None)
return_statement: return True
docstring: Import DICOM files from folder into Slicer database
docstring_summary: Import DICOM files from folder into Slicer database
docstring_tokens: Import DICOM files from folder into Slicer database
function: def importDicom(dicomDataDir, dicomDatabase=None):
    """ Import DICOM files from folder into Slicer database
    """
    try:
      indexer = ctk.ctkDICOMIndexer()
      assert indexer is not None
      if dicomDatabase is None:
        dicomDatabase = slicer.dicomDatabase
      indexer.addDirectory( dicomDatabase, dicomDataDir )
      indexer.waitForImportFinished()
    except Exception as e:
      import traceback
      traceback.print_exc()
      logging.error('Failed to import DICOM folder ' + dicomDataDir)
      return False
    return True
function_tokens: def importDicom ( dicomDataDir , dicomDatabase = None ) : try : indexer = ctk . ctkDICOMIndexer ( ) assert indexer is not None if dicomDatabase is None : dicomDatabase = slicer . dicomDatabase indexer . addDirectory ( dicomDatabase , dicomDataDir ) indexer . waitForImportFinished ( ) except Exception as e : import traceback traceback . print_exc ( ) logging . error ( 'Failed to import DICOM folder ' + dicomDataDir ) return False return True