Open korbinian90 opened 1 day ago
I will investigate. This is particularly relevant for DWI scans, where the b=0 volumes have a lot more signal than the b-weighted volumes.
@neurolabusc , and @korbinian90, perhaps we should add the 4th dimension here in calculateNewRange
. And use the .frame4d
property as the offset so we calculate hi
and lo
from the specific volume in the time series.
I noticed as well that when first opening a 4D image with the intensity reducing over the 4th dimension, the first volume is scaled too bright. Probably it calculates the scaling from all the 4D data. Would your approach help in that case as well @hanayik? Would it make sense to store one scaling per 3D volume? But that might make it overly complicated..
@korbinian90 I believe that the intensity is scaled based on the first volume. If the first volume is much brighter than the subsequent ones, it is likely one of two reasons that are inherent to the MR sequences:
@neurolabusc I still think the image is scaled based on all 4D data and not only the first 3D volume. You can test it here: https://niivue.github.io/niivue-vscode/?images=https://korbinian90.github.io/Shared_Data/test4D.nii.gz This is just a gradient image getting larger for later time points. When opening, the first 3D volume is quite dark. It's intensity goes from 1 to 32, but it is scaled to about the range [2;120]. The last time point goes up to 128, so that is why I think the whole 4D volume is used for scaling. Maybe this does make sense? With that scaling, all 3D volumes can be viewed somewhat fine without needing rescaling.
When a 4D image is opened, it seems like the windowing (right mouse button window drawing for contrast adjustment) is always performed on the first echo/timepoint.
Steps to reproduce: Open this link: https://niivue.github.io/niivue-vscode/?images=https://korbinian90.github.io/Shared_Data/test4D.nii.gz Select View -> Multiplanar + Time Series Test: Windowing works fine on first timepoint Problem: Selecting a later time point, the windowing does not work