Hello,


we have some problems with the 'fslcomplex' function. We get the following error message


fslcomplex -complexmerge image_complex1.nii.gz image_complex2.nii.gz test.nii.gz

Image Exception : #5 :: Out of Bounds (time index)

terminate called after throwing an instance of 'RBD_COMMON::BaseException'

Aborted (core dumped)


When we look at the code, a potential problem can be that the for loop in the function 'complexmerge' is


for (int n=vr1.mint(); n<=vr1.maxt(); n++) {


instead of


for (int n=vr1.mint(); n<vr1.maxt(); n++) {


i.e. <= instead of <


https://github.com/mshvartsman/FSL/blob/7aa2932949129f5c61af912ea677d4dbda843895/src/avwutils/fslcomplex.cc



Is this a bug or are we using the function incorrectly?


- Anders









To unsubscribe from the FSL list, click the following link:
https://www.jiscmail.ac.uk/cgi-bin/webadmin?SUBED1=FSL&A=1