microsoft / microsoft/dicom-server

Microsoft.Health.Dicom.Client 10.0.535 throws Malformed DICOM json on FL/FD -Infinity

Open
#3,532 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
513
Forks
195
PR merge metrics
No merged PRs in 30d

Description

Package

  • Microsoft.Health.Dicom.Client 10.0.535
  • Microsoft.Health.FellowOakDicom 10.0.535 (pulled in by that client)

Used against Azure Health Data Services DICOM service WADO-RS GET …/studies/{uid}/metadata (application/dicom+json).

What happens

The DICOM service returns HTTP 200. For a private FL element whose IEEE value is −Infinity it emits a JSON string, because JSON has no numeric infinity:

"00232018": { "vr": "FL", "Value": ["-Infinity", -1] }

RetrieveStudyMetadataAsync then throws:

System.Text.Json.JsonException: Malformed DICOM json, number expected

The exception aborts the entire study enumerate. Callers see instance count 0 even though the service has the study.

Confirmations

  • Replacing "-Infinity" with a finite number: client 10.0.535 succeeds.
  • Same payload with fo-dicom 5.2.6 DicomJsonConverter: succeeds.
  • Failure is client-side JSON parse, not WADO-RS retrieve.

Minimal JSON (no PHI)

RetrieveStudyMetadataAsync against a stub HttpMessageHandler that returns application/dicom+json:

[
  {
    "00720076": {
      "vr": "FL",
      "Value": ["-Infinity", -1]
    }
  }
]

Expected: two FL values, NegativeInfinity and -1.
Actual on 10.0.535: JsonException.

This repo’s current main client uses stock fo-dicom (not the old FellowOakDicom fork). Bumping fo-dicom to 5.2.6 and adding that stub-handler test locks the behavior. A published Microsoft.Health.Dicom.Client after that bump is what 10.0.535 consumers need.

Ask

Please treat this as a Microsoft.Health.Dicom.Client bug, merge the accompanying PR, and publish a new package.

No patient identifiers in this report.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at RetrieveStudyMetadataAsync and inspect how the current main client uses stock fo-dicom to parse application/dicom+json. Reproduce the payload with a stub HttpMessageHandler, then verify that the dependency update and test accept FL values of -Infinity and -1 without aborting study enumeration.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.