Difference between revisions of "Slicer3/DICOM import mechanism"
From Slicer Wiki
Line 18: | Line 18: | ||
# [http://code.google.com/p/simplefilewatcher/ FileWatcher] has been placed in Slicer3/Libs. From the link, "FileWatcher is a C++ wrapper for OS file monitoring systems. Currently it uses Win32 ReadDirectoryChangesW for monitoring changes in Windows, and inotify in linux. OSX is supported via kqueue and directory scans." FileWatcher is portable and has a [http://code.google.com/p/simplefilewatcher/source/browse/trunk/License.txt liberal (MIT) license]. | # [http://code.google.com/p/simplefilewatcher/ FileWatcher] has been placed in Slicer3/Libs. From the link, "FileWatcher is a C++ wrapper for OS file monitoring systems. Currently it uses Win32 ReadDirectoryChangesW for monitoring changes in Windows, and inotify in linux. OSX is supported via kqueue and directory scans." FileWatcher is portable and has a [http://code.google.com/p/simplefilewatcher/source/browse/trunk/License.txt liberal (MIT) license]. | ||
# A Patient/Study/Series/Image [[Slicer3/strawman_DICOM_Schema|sqlite schema has been designed]]. | # A Patient/Study/Series/Image [[Slicer3/strawman_DICOM_Schema|sqlite schema has been designed]]. | ||
+ | # DicomToSQLite recursively parses directories looking for dicom file. Creates sql statements to populate a database using [[Slicer3/strawman_DICOM_Schema|the schema described here]]. Also creates a nhdr file that references the original dicom files. |
Revision as of 00:20, 12 March 2010
Home < Slicer3 < DICOM import mechanismSome DICOM-enabled applications have import mechanisms that run in the background. One system, the GE Advantage Windows Workstation, monitors a specific directory and imports dicom files that arrive into that directory.
Proposal 1:
Create a program (without a user interface) that monitors a specific directory for dicom files. When a file arrives in this directory, the program parses the file and populates an SQL database. This database can be accessed by other applications that may or may not have a user interface. For example, Slicer3 could provide a GUI to browse the database and load user selected DICOM series.
Issues
- Should the program move the DICOM files to another location once they arrive
- On startup, should the program synchronize the database with existing files. For example, if a user deletes the DICOM files with an OS command like rm, should the program delete the corresponding entries in the database, or, should the sync be user driven.
Components
- An SQL Schema.
- A library to monitor files.
- A program to parse DICOM files and populate an SQL database.
- A GUI to browse and load DICOM files from the SQL database.
Progress
- FileWatcher has been placed in Slicer3/Libs. From the link, "FileWatcher is a C++ wrapper for OS file monitoring systems. Currently it uses Win32 ReadDirectoryChangesW for monitoring changes in Windows, and inotify in linux. OSX is supported via kqueue and directory scans." FileWatcher is portable and has a liberal (MIT) license.
- A Patient/Study/Series/Image sqlite schema has been designed.
- DicomToSQLite recursively parses directories looking for dicom file. Creates sql statements to populate a database using the schema described here. Also creates a nhdr file that references the original dicom files.