cornerstone3D icon indicating copy to clipboard operation
cornerstone3D copied to clipboard

[Bug] Images wrongly loaded when size in x and y are different

Open albagarrey opened this issue 1 year ago • 5 comments

Describe the Bug

I am loading an image with a wado loader. The size in the X axis is different from the size in the Y axis. This is the complete metadata of each dicom:

{'00080005': {'vr': 'CS', 'Value': ['ISO_IR 100']}, '00080008': {'vr': 'CS', 'Value': ['DERIVED', 'SECONDARY', 'MPR']}, '00080016': {'vr': 'UI', 'Value': ['1.2.840.10008.5.1.4.1.1.2']}, '00080018': {'vr': 'UI', 'Value': ['1.3.6.1.4.1.55648.164020421491223780677773683262514360440.204.1']}, '00080020': {'vr': 'DA', 'Value': ['20190313']}, '00080030': {'vr': 'TM'}, '00080032': {'vr': 'TM', 'Value': ['095248']}, '00080050': {'vr': 'SH', 'Value': ['XXX_573942136']}, '00080060': {'vr': 'CS', 'Value': ['CT']}, '00080070': {'vr': 'LO', 'Value': ['Philips']}, '00080080': {'vr': 'LO', 'Value': ['XXX']}, '0008103E': {'vr': 'LO', 'Value': ['HEAD AX MPR']}, '00081040': {'vr': 'LO', 'Value': ['na']}, '00081090': {'vr': 'LO', 'Value': ['iCT 256']}, '00100010': {'vr': 'PN', 'Value': [{'Alphabetic': 'XXX_Patient_2207674320132130077'}]}, '00100020': {'vr': 'LO', 'Value': ['XXX_Patient_2207674320132130077']}, '00100040': {'vr': 'CS', 'Value': ['M']}, '00101010': {'vr': 'AS', 'Value': ['050Y']}, '00180015': {'vr': 'CS', 'Value': ['BRAIN']}, '00180022': {'vr': 'CS', 'Value': ['HELIX']}, '00180050': {'vr': 'DS', 'Value': [2.5]}, '00180060': {'vr': 'DS', 'Value': [120]}, '00180088': {'vr': 'DS', 'Value': [2.5]}, '00180090': {'vr': 'DS', 'Value': [500]}, '00181020': {'vr': 'LO', 'Value': ['4.1']}, '00181030': {'vr': 'LO', 'Value': ['HEAD WITHOUT /Head']}, '00181100': {'vr': 'DS', 'Value': [291]}, '00181110': {'vr': 'DS', 'Value': [1040]}, '00181111': {'vr': 'DS', 'Value': [570]}, '00181120': {'vr': 'DS', 'Value': [0]}, '00181130': {'vr': 'DS', 'Value': [164.3]}, '00181150': {'vr': 'IS', 'Value': [1883]}, '00181151': {'vr': 'IS', 'Value': [239]}, '00181152': {'vr': 'IS', 'Value': [450]}, '00181160': {'vr': 'SH', 'Value': ['UC']}, '00181210': {'vr': 'SH', 'Value': ['UC']}, '00185100': {'vr': 'CS', 'Value': ['HFS']}, '00189306': {'vr': 'FD', 'Value': [0.625]}, '00189307': {'vr': 'FD', 'Value': [80]}, '00189309': {'vr': 'FD', 'Value': [42.5]}, '00189310': {'vr': 'FD', 'Value': [50.944]}, '00189311': {'vr': 'FD', 'Value': [0.398]}, '00189345': {'vr': 'FD', 'Value': [59.60000000000017]}, '0020000D': {'vr': 'UI', 'Value': ['1.3.6.1.4.1.55648.164020421491223780677773683262514360440']}, '0020000E': {'vr': 'UI', 'Value': ['1.3.6.1.4.1.55648.164020421491223780677773683262514360440.204']}, '00200011': {'vr': 'IS', 'Value': [204]}, '00200012': {'vr': 'IS', 'Value': [2]}, '00200013': {'vr': 'IS', 'Value': [1]}, '00200032': {'vr': 'DS', 'Value': [-127.5675, -5.424177, 1064.29580958579]}, '00200037': {'vr': 'DS', 'Value': [0.994968, -0.06814497, -0.07345025, 0.0310074, 0.9065236, -0.4210149]}, '00201040': {'vr': 'LO'}, '00201041': {'vr': 'DS', 'Value': [1009.18]}, '00280002': {'vr': 'US', 'Value': [1]}, '00280004': {'vr': 'CS', 'Value': ['MONOCHROME2']}, '00280010': {'vr': 'US', 'Value': [390]}, '00280011': {'vr': 'US', 'Value': [404]}, '00280030': {'vr': 'DS', 'Value': [0.57004, 0.57004]}, '00280100': {'vr': 'US', 'Value': [16]}, '00280101': {'vr': 'US', 'Value': [12]}, '00280102': {'vr': 'US', 'Value': [11]}, '00280103': {'vr': 'US', 'Value': [0]}, '00281050': {'vr': 'DS', 'Value': [40, 40]}, '00281051': {'vr': 'DS', 'Value': [80, 80]}, '00281052': {'vr': 'DS', 'Value': [-1024]}, '00281053': {'vr': 'DS', 'Value': [1]}, '7FE00010': {'vr': 'OW', 'BulkDataURI': 'XXXX'}}

When Cornerstone displays the image, the same size is used in both axis leading to voxels moving from their correct positions when going through the stack (only the first slice in the stack is seen correctly): Captura de pantalla 2024-02-16 a las 9 13 09 Captura de pantalla 2024-02-16 a las 9 13 18 Captura de pantalla 2024-02-16 a las 9 13 28

This happens with all the images that have different x and y sizes.

Steps to Reproduce

  1. Open an image with size x != size y

The current behavior

Only one slice in the stack is seen correctly

The expected behavior

Adapt the size of each slice to the size stated in the metadata

OS

macOC

Node version

18.17.1

Browser

Chrome

albagarrey avatar Feb 16 '24 08:02 albagarrey

Could you kindly provide the data if it has been anonymized and you can confirm that there is no patient health information present in any of the headers or embedded within the pixel data?

sedghi avatar Feb 16 '24 17:02 sedghi

Sure, you can find the complete series here: dicoms. Thanks @sedghi

albagarrey avatar Feb 21 '24 15:02 albagarrey

Any updates on this? @sedghi Thanks :)

albagarrey avatar Mar 19 '24 16:03 albagarrey

Hello @sedghi. Have you been able to check this?

albagarrey avatar Jun 18 '24 13:06 albagarrey

If i drag and drop it in OHIF it works fine

CleanShot 2024-06-21 at 11 00 22@2x

also if i use orthanc to upload them and works fine too

so i think it is your server issue and possibly metadata

CleanShot 2024-06-21 at 11 12 51@2x

sedghi avatar Jun 21 '24 15:06 sedghi