You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CSWIL has been recently equipped with an option to scale the array given the scaling parameters. It also can accept a targetBuffer to store the pixelData in the specified typedArray constructor name (Float32Array, Uint8Array etc).
Here are the problems:
Memory inefficiency: Right now we are putting every thing regardless of the bitsAllocation into a Float32Array. The reason is scaling, since we are scaling PT series which will end up with float pixelData.
Potential Solution:
CSWIL should have a mechanism to compute the proper typed Array for the given pixelData, intercept, slop. It would be something like:
Then we need a function to reason about the minValueAfterScale (MVAS) and maxValueAfterScale(MXVAS), something like
function getTypedArrayConstructor(MVAS, MXVAS){
if (MVAS>0 && MXVAS<255 && isInteger(MVAS)) return Uint8Array
If (MVAS < 0 && MVAS > -128 && MXVAS < 127 && isInteger(MVAS)) return Int8Array
If (isFloat) return Float32Array
...
Notes:
Volume Loaders should still specify their targetBuffer since we use SharedArrayBuffer and fill it by pointers.
IsInteger and IsFloat should be written in a way that 1.0 be a float, and not integer (maybe we need to take into account the floatness of slope and intercept and scalingParams too?)
The text was updated successfully, but these errors were encountered:
CSWIL has been recently equipped with an option to scale the array given the scaling parameters. It also can accept a
targetBuffer
to store the pixelData in the specified typedArray constructor name (Float32Array
,Uint8Array
etc).Here are the problems:
bitsAllocation
into a Float32Array. The reason is scaling, since we are scaling PT series which will end up with float pixelData.Potential Solution:
CSWIL should have a mechanism to compute the proper typed Array for the given pixelData, intercept, slop. It would be something like:
Then we need a function to reason about the minValueAfterScale (MVAS) and maxValueAfterScale(MXVAS), something like
Notes:
SharedArrayBuffer
and fill it by pointers.slope
andintercept
andscalingParams
too?)The text was updated successfully, but these errors were encountered: