Tools/find for floats array, or bulk tags

I’m trying to find all instances of a series with a specific ImagePositionPatient. For example, when I ask the API, Orthanc tells me that one of the instance has

"ImagePositionPatient" : "93.81687\\-137.8313\\93.72376",

and I know that some instances will have the same ImagePositionPatient. This is useful to know for GE scanners.

So I use tools/find. I start with

-d '{"Level": "Instance", "Query": {"SeriesInstanceUID": "..."}}'

which returns all instances of the requested series, as I wanted. However, when I add

"ImagePositionPatient": "93.81687\\-137.8313\\93.72376"
or
"ImagePositionPatient": "93.81687\\\\-137.8313\\\\93.72376"

it never returns anything. Is it possible to search for a float array? I know I can code a loop and request that tag for all instances, but some of our series have 2000+ instances… Even with 100, it would still be slow.

If it’s not possible, I have a side question. Is there a tool to return the tag’s value of all the instances of a series? I can’t use shared-tags because I know the values will change.

Hi,

No, tools/find won’t allow you to search in a float array.

To get all the tags from all instances of a series, you can call http://localhost:8042/series/08a23232-a61c3cb9-5cdb4518-b725cd5d-820ee1f6/instances

or, with tools/find, you can :

curl http://192.168.0.10:8042/tools/find -d '{"Query": {"SeriesInstanceUID": "1.2.276.0.7230010.3.1.3.1204989152.4260.1515688349.235"}, "Level": "Instance", "RequestedTags": ["ImagePositionPatient", "SOPInstanceUID"], "ResponseContent": ["RequestedTags"]}'

HTH,

Alain

1 Like

Both commands do the job perfectly (tools/find is a little slower for some reasons).

ImagePositionPatient is one of the default tags in MainDicomTags so RequestedTags isn’t needed! Thank you Alain.