Git Product home page Git Product logo

Comments (6)

sedghi avatar sedghi commented on June 18, 2024 2

Yeah I started this yesterday, there are some parts in wado that need to be changed too

from cornerstone3d.

swederik avatar swederik commented on June 18, 2024 1

from cornerstone3d.

sedghi avatar sedghi commented on June 18, 2024 1

Hey, it is not a priority but on the roadmap

from cornerstone3d.

Ouwen avatar Ouwen commented on June 18, 2024

Thanks for the above @swederik, just starting to revisit this issue now that Kitware/vtk-js#2058 is merged.

@sedghi, based on our conversation today... I was looking through where changes would need to have a cornerstone3D flag to use 16bit/half float. My understanding based on our conversation is that if the vtk mapper sets the preferSizeOverAccuracy flag to true it will properly use norm 16 or half float depending on the extensions available.

For norm16 and half float to be used, it requires the data provided to VTK to either be UNSIGNED_SHORT or SHORT (uint16/int16), but we currently type cast to Float32 in cornerstonejs

For half float implementation, it seems like the dynamic range is scaled to better fall in between [-2048, 2048] for accuracy purposes. For dicom pixel data, the BitsStored is usually smaller than BitsAllocated. For CT machines it is usually 12 bit stored and 16 bit allocated. Uint16 values beyond the BitsStored is typically burned in data where the dynamic range is less important. When we transition to the UNSIGNED_SHORT or SHORT dtype, it might make sense to clamp the data to BitsStored so the important part of the pixelData can be better preserved.

Here are the immediate code lines which might need to be changed:

https://github.com/cornerstonejs/cornerstone3D-beta/blob/d58c9fbe3f8bfc09aa9ece28f8ae1ca1141c2c7e/packages/core/src/RenderingEngine/vtkClasses/vtkStreamingOpenGLTexture.js#L59-L70

https://github.com/cornerstonejs/cornerstone3D-beta/blob/d58c9fbe3f8bfc09aa9ece28f8ae1ca1141c2c7e/packages/core/src/volumeLoader.ts#L234-L248

https://github.com/cornerstonejs/cornerstone3D-beta/blob/d58c9fbe3f8bfc09aa9ece28f8ae1ca1141c2c7e/packages/core/src/RenderingEngine/StackViewport.ts#L1198-L1223

https://github.com/cornerstonejs/cornerstone3D-beta/blob/d58c9fbe3f8bfc09aa9ece28f8ae1ca1141c2c7e/packages/streaming-image-volume-loader/src/cornerstoneStreamingImageVolumeLoader.ts#L109-L137

from cornerstone3d.

Zelzahn avatar Zelzahn commented on June 18, 2024

Hey @sedghi, what's the current status of this?

from cornerstone3d.

sedghi avatar sedghi commented on June 18, 2024

Done in main branch

from cornerstone3d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.