-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(rendering): should still use Float32 when not 16 bit for scaling issues #501
Conversation
✅ Deploy Preview for cornerstone-3d-docs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
@@ -497,7 +499,7 @@ function createUint16SharedArray(length: number): Uint16Array; | |||
function createUint8SharedArray(length: number): Uint8Array; | |||
|
|||
// @public (undocumented) | |||
export function createVolumeActor(props: createVolumeActorInterface, element: HTMLDivElement, viewportId: string, suppressEvents?: boolean): Promise<VolumeActor>; | |||
export function createVolumeActor(props: createVolumeActorInterface, element: HTMLDivElement, viewportId: string, suppressEvents?: boolean, use16BitTexture?: boolean): Promise<VolumeActor>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's probably time to add an options bag here rather than just adding additional parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will get removed soon, so can we not do it in this PR?
@@ -61,7 +62,7 @@ async function createVolumeActor( | |||
// types of volumes which might not be composed of imageIds would be e.g., nrrd, nifti | |||
// format volumes | |||
if (imageVolume.imageIds) { | |||
await setDefaultVolumeVOI(volumeActor, imageVolume); | |||
await setDefaultVolumeVOI(volumeActor, imageVolume, use16BitTexture); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This option should go in an options object, as there may well be others in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a temporary fix to resolve rendering issues this looks ok. There are comments we will likely need applied eventually, but looks good in the short term.
@sedghi does this change also solve #481 (comment) |
@sedghi, I was going through a rebase and I think there are some breaking changes here. The main issue is that we allow We can either fix in CSWIL or fix in CS3D. I'm thinking CS3D and can push up a fix. However, if dicomLoader feature is coming soon, I can hold off on this and stay on older cs3D verison. |
* feat: add 16 bit data type scale under a decode flag * fix linter
@Ouwen I guess in the next couple of days i will use dicom Image loader |
1 similar comment
@Ouwen I guess in the next couple of days i will use dicom Image loader |
We introduced optional 16 bit texture support in the previous pr here, but because of scaling issues in PT, the images were casted to int/uint 16 while they should still be Float.
These changes will get reverted back once we merge the dicomImageLoader which properly handles scaling
FYI @Ouwen