Open scottwittenburg opened 4 years ago
I think this is related to #272 in that it is caused by volume rendering large scalar values. The reason the Float64Array
version of the data doesn't suffer from the issue is that it fails this check, resulting in "conversion to float", here. That code path transforms the large values to a smaller range before uploading them to texture, at the same time sending extra uniforms to the shader so the values can be transformed back after being retrieved from the texture.
By commenting out lines 1058 -1065
, linked above, the transformation path is forced, which resolves the issue, but probably causes other problems (e.g. inefficiency in a lot of use cases). So we should look for a better solution.
When I "compose" just the
190216_t2_extracted.nrrd
image with itself, using theitk.imread('190216_t2_extracted.nrrd', itk.F)
method to read the image, it seems the use ofitk.F
causes the input values (which areFloat64Array
) to be "downcast" toFloat32Array
. When I use the viewer to volume render the resulting data, the view is initially black, but if I turn off "Use Shadow", I can see something, but it's still wrong.Here's an animated gif illustrating the problem.