Create a Qt based brwoser for DICOM directories.
All DICOM Browser related changes up to now. Unresolved issues:
- error handling if some process fails
- An empty file is created by Qt. If the database creation fails afterwards, a new database will never be created.
- The columnm headers are not readable. This can be changed by using "SELECT xxx AS yyy". See the modified select statement.
- Directory listing takes too much space.
- Dates are not formatted in readable way, there should be some formatting code for this in the Liver tool.
- The DataTreeNodes should get a name, eg the study description
This patch contains the modifications and fixes requested from Marco in the previous comment.
A few things must be modified:
Line 233: The path to the DicomIndex app.
Lines 55-71: The paths to the DicomIndexer app, to the database and to the DB initialization script.
The PATH variable has to contain the mitk/bin subdirectory. Please try that. Can you also add some log output that shows the executable and the content of the PATH variable. I think this could be helpful for windows and linux.
[SVN revision 20264]
ENH (#2735): The inclusion of the mitk/bin to the PATH variable worked. LOG_ERROR added, showing the PATH variable and the indexer app name, in case the process do not start.
[SVN revision 20302]
FIX (#2735): Some bug fixes concerning the stop refresh button. The DicomIndexer process did not stop in windows using QProcess::terminate. It was changed to kill.
Because the process is now being killed and does not comes to its natural end, the lock file is not deleted. Since there is no need for a lock file, the lock file creation and remotion was removed.
Another small bug: after closing the MainApp during refresh, the DicomIndexer process kept running in background. It is (supposedly) fixed by killing the process in the view's destructor.
[SVN revision 20370]
ENH (#2735): A few presentation changes were made to the DICOMBrowser. The view does not manage the folder anymore. They are now managed through a preferences page. This allowed the size of the view to be reduced, so it can be placed beneath the standard views. A perspective was created in order to load the view in the mentioned position.
A small change concerning the directory were the DB is placed was also made. The DB is placed in the configuration directory of the application running it, instead of putting it always under .Mitk3M.
Installing MITK 3M (build with MinGW) on a bare WinXP VM shows some problems related to the DicomIndexer call:
No DICOM database. Calling DicomIndexer.exe --exec-sql-script C:/Dokumente und Einstellungen/admin/.Mitk3M3/plugin_cache/dicom.db
I noticed the following points:
- no SQL script supplied on the command line
- spaces in the path are not handled properly
- the path for the .db file points to the plugin_cache, why?? (shouldn't it be something like .Mitk3M3/.metadata/.plugins/org.mitk.gui.qt.dicombrowser/dicom.db?)
- If the SQL script was not supplied in the command line means that it couldn't be found means that it could not be found in any of the StandardFileLocations. This is an installation issue.
- I don't know what you mean by "spaces in the path are not handled properly". I am using the QT file handling classes for this, and I thought it behaves correctly according to the OS being used. Could be more specific?
- You mentioned before that the path should be something like that, but I could not find any working way to get this path from the system. I don't know why this file is landing in the plugin_cache directory. I am using cherry::Platform::GetUserPath(), which (under linux) is the .Mitk3M3.
1.) Okay, I will have a look at the MinGW installer. Where is the script supposed to be? in bin/ ?
2.) Paths with spaces must be quoted, like "C:/path with spaces/". No OS can handle paths containing spaces on the command line without quoting them.
3.) We should have a look at your code this afternoon.
- I don't know exactly. It should be in any directory that is searched by
mitk::StandardFileLocations. It also looks in the source directory
"mbi/Modules/DicomIndexer". I think Marco can be of further help in this point.
- What you see in the log messages is only a LOG_INFO showing the "supposedly"
called commands. It does not mean that the process is being called that way.
QProcess handles the execution, taking an argument list. Are you sure that it
is not working?
[SVN revision 20538]
ENH (#2735): Support for a temporary DB added. This was performed to allow the management of removable media. The temporary DB is allways reinited when the application restarts or when a new temporary dir is selected.
[SVN revision 20616]
CHG (#2735): Paths for databases storage where modified according the OpenCherry standards. Instead of putting them direct to .Mitk3M3, they are now put to .Mitk3M3/.metadata/.plugins/org.mitk.gui.qt.dicombrowser/