about the structure of index.dat generated by dcmprscp

All other questions regarding DCMTK

Moderator: Moderator Team

Post Reply
Message
Author
hughman
Posts: 6
Joined: Fri, 2009-04-10, 07:19

about the structure of index.dat generated by dcmprscp

#1 Post by hughman »

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?

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#2 Post by Michael Onken »

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

hughman
Posts: 6
Joined: Fri, 2009-04-10, 07:19

#3 Post by hughman »

Thx for your quick reply.

What's more, is the structure of index.dat generated by dcmPRscp the same as that by dcmQRscp?

Second, why are the tags, such as PatientID, PatientName, in SP files generated by dcmprscp always empty?

with regards
hughman

Michael Onken
DCMTK Developer
Posts: 2049
Joined: Fri, 2004-11-05, 13:47
Location: Oldenburg, Germany
Contact:

#4 Post by Michael Onken »

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

hughman
Posts: 6
Joined: Fri, 2009-04-10, 07:19

#5 Post by hughman »

Thanks again.

Your info is very useful. It seems the same as dcmqrscp.

hughman
Posts: 6
Joined: Fri, 2009-04-10, 07:19

Re: about the structure of index.dat generated by dcmprscp

#6 Post by hughman »

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.

J. Riesmeier
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

#7 Post by J. Riesmeier »

The answer should be easy to find when looking into the source code:

Code: Select all

    /* we only have second accuracy */
    pStudyDesc[s]. LastRecordedDate =  (double) time(NULL);
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 :wink:.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest