Do the dcmqrscp can be competent as a good database?
Moderator: Moderator Team
Do the dcmqrscp can be competent as a good database?
Or can be enhance it to a good database?
And I want to know the efficency of using findscu to query message from dcmqrscp.
Thank you very much!
And I want to know the efficency of using findscu to query message from dcmqrscp.
Thank you very much!
-
- DCMTK Developer
- Posts: 2072
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Hi Kamil,
dcmqrdb only uses an index file to manage DICOM studies/series/images in the archive. Since the index file is just searche from start to end for an incoming request, I expect the performance being a littlebit worse than a database in the very beginning but extremely worse compared to a DB if you have more than a few dozens of studies.
We have heard of people using dcmqrdb also for larger scale projects with thousands of studies. If the index file can be kept in memory, the performance is maybe somehow ok. But if the server starts swapping and re-reading from hard disk it becomes really slow. Please also note that you have to change some constants in dcmqrdb's code if you want it to accept more than a few hundred images. Search the forum for this; e. g. you will find this posting.
findscu should perform pretty good, it is quite a simple program and does not do much unnecessary stuff, I think
Best regards,
Michael
dcmqrdb only uses an index file to manage DICOM studies/series/images in the archive. Since the index file is just searche from start to end for an incoming request, I expect the performance being a littlebit worse than a database in the very beginning but extremely worse compared to a DB if you have more than a few dozens of studies.
We have heard of people using dcmqrdb also for larger scale projects with thousands of studies. If the index file can be kept in memory, the performance is maybe somehow ok. But if the server starts swapping and re-reading from hard disk it becomes really slow. Please also note that you have to change some constants in dcmqrdb's code if you want it to accept more than a few hundred images. Search the forum for this; e. g. you will find this posting.
findscu should perform pretty good, it is quite a simple program and does not do much unnecessary stuff, I think
Best regards,
Michael
If I want to establish a high performance DB as a achiving server, how can I use dcmtk to do this? May I enchance the dcmqrscp(using dcmtk's other functions)? Or create a new way of achiving?Or as you say, keep the index file in the memroy?Michael Onken wrote:Hi Kamil,
dcmqrdb only uses an index file to manage DICOM studies/series/images in the archive. Since the index file is just searche from start to end for an incoming request, I expect the performance being a littlebit worse than a database in the very beginning but extremely worse compared to a DB if you have more than a few dozens of studies.
We have heard of people using dcmqrdb also for larger scale projects with thousands of studies. If the index file can be kept in memory, the performance is maybe somehow ok. But if the server starts swapping and re-reading from hard disk it becomes really slow. Please also note that you have to change some constants in dcmqrdb's code if you want it to accept more than a few hundred images. Search the forum for this; e. g. you will find this posting.
findscu should perform pretty good, it is quite a simple program and does not do much unnecessary stuff, I think
Best regards,
Michael
Thanks,
Kamil
-
- DCMTK Developer
- Posts: 2072
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Hi,
if would extend dcmqrdb to use a "real" database like MySQL, Postgres or if you want a slim variant, SQLite. If you dig into dcmqrdb's source code, you will find an abstract interface for a data source that is currently only implemented for the index file. You should write an implementation for SQL, then.
Another possibility is just to use an existing Open Source PACS. For example, look on the Internet for Conquest PACSor dcm4che
if would extend dcmqrdb to use a "real" database like MySQL, Postgres or if you want a slim variant, SQLite. If you dig into dcmqrdb's source code, you will find an abstract interface for a data source that is currently only implemented for the index file. You should write an implementation for SQL, then.
Another possibility is just to use an existing Open Source PACS. For example, look on the Internet for Conquest PACSor dcm4che
can you specify where exactly in the code I have to search?
a kind of ODBC connection would be great here
i've found the handle assoc for the index.dat in dcmqrdbi.cxx class DcmQueryRetrieveIndexDatabaseHandleFactory
the dcmqrscp.cxx contains the following lines:
but the class DcmQueryRetrieveSQLDatabaseHandleFactory is not used anywhere right?
a kind of ODBC connection would be great here
i've found the handle assoc for the index.dat in dcmqrdbi.cxx class DcmQueryRetrieveIndexDatabaseHandleFactory
the dcmqrscp.cxx contains the following lines:
Code: Select all
#ifdef WITH_SQL_DATABASE
// use SQL database
DcmQueryRetrieveSQLDatabaseHandleFactory factory;
#else
// use linear index database (index.dat)
DcmQueryRetrieveIndexDatabaseHandleFactory factory(&config);
#endif
-
- DCMTK Developer
- Posts: 2072
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Hi,
No, someone at OFFIS started an implementation of a database backend, that's why you find this #define in the code. So it's clear that you should start your own implementation by implementing the abstract base classes existing, e. g. implement a DcmQueryRetrieveIndexDatabaseHandleFactory or whatever you call it to replace the file-based DcmQueryRetrieveIndexDatabaseHandleFactory. Same do for the other file-based classes.
Good luck
Michael
No, someone at OFFIS started an implementation of a database backend, that's why you find this #define in the code. So it's clear that you should start your own implementation by implementing the abstract base classes existing, e. g. implement a DcmQueryRetrieveIndexDatabaseHandleFactory or whatever you call it to replace the file-based DcmQueryRetrieveIndexDatabaseHandleFactory. Same do for the other file-based classes.
Good luck
Michael
-
- DCMTK Developer
- Posts: 2072
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Yes of course we still work on DCMTK Code is added if we have some spare time or companies order some extensions for that. Also, we have students with their diploma thesis or sometimes phds working on DCMTK. You can download the current development versions (pretty stable!) also from the DCMTK download page (look for "snapshot"). Hope you find some C/++ left under the dust hood,
Michael
Michael
-
- DCMTK Developer
- Posts: 2072
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
ok, as far as i understand the code, the content of IdxRecord, defined in dcmqridx.h, is stored in the index.dat right?
so as far as i understand it, i have to define a class DcmQueryRetrieveSQLDatabaseHandleFactory in the dcmqrdbi.h
afterwards i create a function with the same name in dcmqrdbi.cxx which writes the data to an sql database...
so the theorie... it's just that i understand it right ... hope i don't annoy too much
so as far as i understand it, i have to define a class DcmQueryRetrieveSQLDatabaseHandleFactory in the dcmqrdbi.h
afterwards i create a function with the same name in dcmqrdbi.cxx which writes the data to an sql database...
so the theorie... it's just that i understand it right ... hope i don't annoy too much
-
- DCMTK Developer
- Posts: 2072
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Right,
for a database implementation "just" write a class that substitutes class DcmQueryRetrieveIndexDatabaseHandleFactory (dcmqrdbi.h) which is derived the from the abstract base class DcmQueryRetrieveDatabaseHandle (dcmqrdba.h).
Your database class must also derive then from this abstract base class. This requires you in your database class to overwrite all abstract (pure virtual) function prototypes for receiving DICOM files (storeRequest()), and searching DICOM files (e. g. startFindRequest() and others).
Best regards,
Michael
for a database implementation "just" write a class that substitutes class DcmQueryRetrieveIndexDatabaseHandleFactory (dcmqrdbi.h) which is derived the from the abstract base class DcmQueryRetrieveDatabaseHandle (dcmqrdba.h).
Your database class must also derive then from this abstract base class. This requires you in your database class to overwrite all abstract (pure virtual) function prototypes for receiving DICOM files (storeRequest()), and searching DICOM files (e. g. startFindRequest() and others).
Best regards,
Michael
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 1 guest