-
Notifications
You must be signed in to change notification settings - Fork 25
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
Check & revise LN2_DEVEIN linear mode #31
Comments
Hi @ofgulban, I've been looking at this option of if (mode_linear) { // Handle linear case straightforwardly
for (int t=0; t<size_t; ++t) {
for (int i=0; i<nr_voxels; ++i) {
int j = t * nr_voxels + i;
if (*(nii_layer_data + i) > 0) {
float l;
if (layer_max <= 1.0) { // Indicates metric file is used
l = 1 - *(nii_layer_data + i);
} else {
l = 1 - *(nii_layer_data + i) * layer_max;
}
*(nii_output_data + j) = *(nii_input_data + j) * l;
}
}
}
} Apologies if this is incorrect or you have already addressed the issue. It seems to have worked with the simple cases I have been testing on and makes sense when I think about how variable |
Hi @ppxdm4 , Thanks a lot for bringing this to our attention and your informative comment. We ended up not using LN2_DEVEIN over the last year and were postponing looking into this issue. Together with your comment, now we have a reason to address this issue (tagging @layerfMRI as this might be of interest to him too). |
Thanks @ppxdm4, your fix is now included in the It is only now that I appreciate what @ofgulban did in 1d5a3d9 (related to issue #28). |
Hi @ofgulban, @layerfMRI, thank you both for these updates. I have pulled the latest |
Hi @ppxdm4, |
Looking at the previous comments on #28, I think we have changed the columns file behavior due to a few discrepancies between the code and the blog post. Looking at the code, yes the columns file seems to be not used with linear option right now (v2.0.0). However, this is not a strong limitation. We can code in so that linear option uses columns to first averages the voxels within each column, does linear deveining, and writes back into the columns. If @ppxdm4 want to use linear deveining in such a way, I am happy to look into this in the upcoming days :) |
A reminder for myself to revise
LN2_DEVEIN
's-linear
mode. The output value range seems problematic due to the scaling.The text was updated successfully, but these errors were encountered: