Issue37

Title ContourData longer than ORTHANC_MAXIMUM_TAG_LENGTH
Priority urgent Status resolved
Superseder Nosy List admin
Assigned To
Keywords Orthanc Core

Created on 2017-03-15.19:30:26 by admin, last changed by admin.

Files
File name Uploaded Type Edit Remove
Screen Shot 2017-03-15 at 2.09.16 PM.png admin, 2020-06-29.15:18:17 image/png
Messages
msg164 (view) Author: admin Date: 2017-03-15.19:30:26
[BitBucket user: Christopher Ahern]
[BitBucket date: 2017-03-15.18:30:26]

The maximum tag length (256 characters) is too short to allow for sequences of contour point triplets from RSTRUCT files.  

For example, a contour sequence with say five points is fine because it comes in under 256 characters:

1.7578125\\62.126714882\\-426.5\\0.4921874063\\62.8984375\\-426.5\\1.7578125\\63.506911103\\-426.5\\2.4936410429\\62.8984375\\-426.5\\1.7578125\\62.126714882\\-426.5

But, most of the contour sequences are longer than that, so no value is stored (see the attached screenshot from the Orthanc web explorer).

The server doesn't store the contour information and the full and simplified tags returned from the REST API have `null` as the value for ContourData. The information exists in the files themselves, and can be viewed, for example, by opening them in dicompyler.

Is it possible to (1) remove this limit or (2) remove this limit for a specific set of tags (e.g. ContourData)?  It would be nice be able to specify the value of ORTHANC_MAXIMUM_TAG_LENGTH in the config file along with other general storage settings. Would that be possible?
msg165 (view) Author: admin Date: 2020-06-29.15:18:17
[Bugzilla user: s.jodogne@gmail.com]
[Bugzilla date: 2020-06-29T13:18:17+00:00]

Created attachment 83
Screen Shot 2017-03-15 at 2.09.16 PM.png
msg166 (view) Author: admin Date: 2017-03-15.20:19:40
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2017-03-15.19:19:40]

Hello, the `ORTHANC_MAXIMUM_TAG_LENGTH` is present to avoid the JSON summaries to grow indefinitely. If you need to access a tag marked as `Too long`,  please use the `/instances/.../content/...` URI. For instance, the following URL will allow to bypass the limit of 256 characters for the contour sequence:

`http://localhost:8042/instances/abfcaab1-0193eccc-024d46b6-2e119390-288462c5/content/3006-0039/0/3006-0040/0/3006-0050`
msg167 (view) Author: admin Date: 2017-03-15.20:20:38
[BitBucket user: Christopher Ahern]
[BitBucket date: 2017-03-15.19:20:38]

Ah, fantastic, thanks! Is there a way to do that recursively?
msg168 (view) Author: admin Date: 2017-03-15.20:27:23
[BitBucket user: Christopher Ahern]
[BitBucket date: 2017-03-15.19:27:23]

Sorry @sjodogne, is there a way to do this recursively? so that the contents are returned as a json?
msg169 (view) Author: admin Date: 2017-03-15.20:31:51
[BitBucket user: Sébastien Jodogne]
[BitBucket date: 2017-03-15.19:31:51]

This could be done by [creating a plugin](http://book.orthanc-server.com/developers/creating-plugins.html) that would use the `OrthancPluginDicomInstanceToJson()` primitive available in the [plugin SDK](http://sdk.orthanc-server.com/group__Toolbox.html#ga435dba46ef20352fb0f600b944239a32), with the `maxStringLength` argument set to zero.
History
Date User Action Args
2026-07-29 15:51:19admincreate