View in #ohif on Slack
@Johnmark_Enriquez: Hi, everyone.
I have observed some unexpected behavior when using tools that measure Hounsfield units, such as the circle or ellipse tool. In a cone beam scan, the Hounsfield value in air or empty space should be -1000. However, I noticed that when useNorm16Texture
is enabled, the value reads -7000. Disabling useNorm16Texture
restores the expected value, which I believe should be -1000.
Note: We are using useNorm16Texture
to handle large volumes for Multi-Planar Reconstruction (MPR) because our scans are large.
Set-up: Orthanc + OHIF
Below are the images illustrating this behavior:
Left side image: useNorm16Texture
enabled
Right side image: useNorm16Texture
disabled
System Information:
OS: OS X 10.15.7
OHIF Version: 3.8.3
Google Chrome Version: 126.0.6478.128
@Bill_Wallace: Can you see if you are using prefer size over accuracy? Specifically, are you using 16 bit floats or using the native datatype? Take a look at the browser side volume array object and see the type of it.
@Johnmark_Enriquez: No, I’m not using preferSizeOverAccuracy
in my config file. I only use the following settings in my config file:
useSharedArrayBuffer: true,
useNorm16Texture: true
When useNorm16Texture
is enabled, the volume array object is int16Array
. When it is disabled, I think it is Float32Array
.
Please see the image below;
Note on my previous images: The left-side image uses int16Array
and the right-side image uses Float32Array
.
Using int16Array
I’m using both a Mac Mini M2 with Sonoma 14.4.1 and a Dell Intel i5 10th Gen with Windows 11, and both face the same issue.
@Bill_Wallace: That looks like a bug - could you create a defect please?
@Johnmark_Enriquez: Yeah, sure
@Bill_Wallace I’ve created a bug report. Here’s the link: https://github.com/OHIF/Viewers/issues/4296. Thank you for your attention to this.
#4296 [Bug] Hounsfield measurements are incorrect when using useNorm16Texture(int16Array)
Same on the localhost @Bill_Wallace, using the default.js config and enabling the useNorm16Texture
using this datasource link:<https://d33do7qe4w26qo.cloudfront.net/dicomweb>
@Bill_Wallace: Could you create a defect in CS3D describing the issue please? You can describe it in terms of OHIF, but the underlying defect is in CS3D. I will see if I can manage to squeeze in a bit of time to look at it, as I’d really like to be able to use Norm16Texture.
@Johnmark_Enriquez: CS3D = Cornerstone3D, right? @Bill_Wallace
@Bill_Wallace https://github.com/cornerstonejs/cornerstone3D/issues/1397
#1397 [Bug] Hounsfield measurements are incorrect when using useNorm16Texture(int16Array)
@Bill_Wallace: Thank you - I will look at that after vacation
@Johnmark_Enriquez: Thank you @Bill_Wallace
Fyi, not just air/black/empty area…
Most of the areas have incorrect Hounsfield unit calculations.
Left-side image: useNorm16Texture
is enabled
Right-side image: useNorm16Texture
is disabled
I’m using the default config.
I think the value returned is roughly 10 times than the actual value.
@Alireza_Sedghi: PR to fix https://github.com/cornerstonejs/cornerstone3D/pull/1404
#1404 fix(rendering): norm16 and half float was not scaling correctly