about the structure of index.dat generated by dcmprscp
Moderator: Moderator Team
about the structure of index.dat generated by dcmprscp
I am studying virtual printing by commandline dcmprscp.
I want to intergate the stored print objects with RIS, so I need to retrieve some valid information.
I found it not easy to realize because some important tags, such as patientid, accessno, patient name, are always empty in SP files. Why?
The workaround I can try is to retrive the neccessary informations from HG files. So I need to find the mapping from index.dat.
The problem is that I don't know how to parse the database index generated by dcmprscp. Are there some docs for the structure of index.dat?
I want to intergate the stored print objects with RIS, so I need to retrieve some valid information.
I found it not easy to realize because some important tags, such as patientid, accessno, patient name, are always empty in SP files. Why?
The workaround I can try is to retrive the neccessary informations from HG files. So I need to find the mapping from index.dat.
The problem is that I don't know how to parse the database index generated by dcmprscp. Are there some docs for the structure of index.dat?
-
- DCMTK Developer
- Posts: 2049
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Hi,
I think there is no documentation besides dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h . You might check http://support.dcmtk.org/docs/dcmqridx.html application in order to see how to access the file using API methods. For further API search through the dcmqrdb module (=directory) where the dcmqridx.h header is included and API methods used.
HTH,
Michael
I think there is no documentation besides dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h . You might check http://support.dcmtk.org/docs/dcmqridx.html application in order to see how to access the file using API methods. For further API search through the dcmqrdb module (=directory) where the dcmqridx.h header is included and API methods used.
HTH,
Michael
-
- DCMTK Developer
- Posts: 2049
- Joined: Fri, 2004-11-05, 13:47
- Location: Oldenburg, Germany
- Contact:
Hi,
Ah, sorry, was too fast in reading. Unfortunately I cannot give any hints about those files since I did not work with them so far (my colleagues did). Looking into the corresponding source code should help, anyway.
for the PatientID and so on, just a quick guess: I suppose the software does not know them and in DICOM in many objects it is permitted to have such tags existent but empty.
For more information my team mates have to jump in.
Best,
Michael
Ah, sorry, was too fast in reading. Unfortunately I cannot give any hints about those files since I did not work with them so far (my colleagues did). Looking into the corresponding source code should help, anyway.
for the PatientID and so on, just a quick guess: I suppose the software does not know them and in DICOM in many objects it is permitted to have such tags existent but empty.
For more information my team mates have to jump in.
Best,
Michael
Re: about the structure of index.dat generated by dcmprscp
struct StudyDescRecord
{
char StudyInstanceUID [UI_MAX_LENGTH] ;
long StudySize ;
double LastRecordedDate ;
int NumberofRegistratedImages ;
}
In the index.dat, the date type is double. How to convert the date to system time? use OleAut32\VariantTimeToSystemTime?
But it seems wrong. the double value reading from index.dat is always too large to be performanced.
{
char StudyInstanceUID [UI_MAX_LENGTH] ;
long StudySize ;
double LastRecordedDate ;
int NumberofRegistratedImages ;
}
In the index.dat, the date type is double. How to convert the date to system time? use OleAut32\VariantTimeToSystemTime?
But it seems wrong. the double value reading from index.dat is always too large to be performanced.
-
- DCMTK Developer
- Posts: 2504
- Joined: Tue, 2011-05-03, 14:38
- Location: Oldenburg, Germany
- Contact:
Re: about the structure of index.dat generated by dcmprscp
The answer should be easy to find when looking into the source code:
You have to understand that the basic structure of the "index.dat" has been defined about 20 years ago. At that time, nobody thought about supporting a non-Unix OS .
Code: Select all
/* we only have second accuracy */
pStudyDesc[s]. LastRecordedDate = (double) time(NULL);
Who is online
Users browsing this forum: No registered users and 1 guest