This is a discussion on efficiently querying and retrieving large numbers of images - DICOM ; I want to quickly query and retrieve all images whose study dates fall into a given date range from a PACS/DICOM image server, no matter which series, study or patient they belong to. What would be the best strategy to ...
I want to quickly query and retrieve all images whose study dates fall
into a given date range from a PACS/DICOM image server, no matter
which series, study or patient they belong to. What would be the best
strategy to accomplish this?
I can execute a C-FIND query against the server with SOP class
(1.2.840.10008.5.1.4.18.104.22.168) and with a query identifier that
contains only empty tag values except for the QueryRetrieveLevel
(0008,0052) tag (which is set to "IMAGE") and the Study Date tag
(which is set to the date range I'm interested in). This works, but
I'm not sure why. If I understand the standard correctly (PS3.4-2006,
C.22.214.171.124 => C.126.96.36.199, Table C.6-4), I should at least have to
specify a unique SOP Instance UID (0008,0018), which would mean I
could only query a single image?? Even if I chose the "STUDY"
query/retrieve level instead of the "IMAGE" level, I should only be
able to query all images in a given study, not all images on the
server. Right? Still, a C-FIND with an identifier as specified above
works with all servers I can test here (JDicom ImageServer, dcm4chee,
Siemens Syngo MR 2004V). And that's a good thing, because otherwise I
wouldn't know how to do cross-patient queries at all...
Furthermore, I have to retrieve (via C-MOVE) all images in the given
date range. I first thought about just replacing the C-FIND request
with a C-MOVE, but I noticed that in the case of C-MOVE, the standard
(as I understand it) is adhered to more strictly -- for example, if I
submit a StudyRoot C-MOVE with (0008,0052)QueryRetrieveLevel="IMAGE",
I have to supply a non-null (0008,0018)SOPInstanceUID, otherwise an
error status (0xA900 "Identifier does not match SOP class") is
returned. So it looks like you can't do a cross-study (or
cross-patient) C-MOVE retrieval, right?
So, what would be the best way to implement a cross-study/patient find
and retrieval? The easiest route would be combining a
cross-study/patient C-FIND as described above with a per-image C-MOVE
(i.e. retrieve each found image with a separate C-MOVE), but that's
going to be very slow on most servers I checked here.
An alternative could be to (1) C-FIND all matching studies (the only
query parameter is a study date range, so this shouldn't be a
problem), and then (2) retrieve all images from each found study with
one C-MOVE per study. The problem here is part (1) -- AFAICS, all the
Query/Retrieve C-FIND SOP classes in the 2006 version of the DICOM
standard return image composites as results, not studies (I could of
course extract the study UIDs from the composites, but that would
again be vastly inefficient). There is a set of "Patient/Study Only"
SOP classes which appear to be ideal candidates for my purposes (they
operate on a data model that only contains patients and studies, so
they should return studies as results). The problem is that these SOP
classes have all been retired in the 2006 version of the
standard. Does anyone know why? Is there an adequate replacement that
I'm not aware of?
Or am I tackling this problem wholly wrongly? Any
suggestion/hint/advice is appreciated. Thanks.