BIC-MNI / minc-tools

Basic minc-tools from former minc repository
Other
29 stars 25 forks source link

add test for mincresample with 4D float volume #121

Closed jiax1994 closed 1 year ago

jiax1994 commented 1 year ago

this is a test update for the mincresample bug fix, so this test should fail before the bug fix, and should succeed after the fix.

FYI, please use release mode to build and test the executables before vs after the bug fix, since this bug only happened in release mode built.

the criteria of succeed is to compare the input and output of mincresample <input.mnc> <output.mnc>, using minccmp for comparison, in the case of correct fix, the xcorr is supposed to be or very close to 1 because the input and output are supposed to be identic.

jiax1994 commented 1 year ago

To address the older comment from @gdevenyi in previous merged PR, i managed to create an example file from existing testing file under /Testing/test-rnd.mnc, here is how to create the example input file to trigger the bug mincreshape -float -colsize 125 -rowsize 1 test-rnd.mnc test-rnd-reshaped.mnc -clobber mincconcat -concat_dimension time test-rnd-reshaped.mnc test-rnd-reshaped-4d.mnc -clobber Basically the commands above convert the test-rnd.mnc to a 4D float volume with reshaped image-data test-rnd-reshaped-4d.mnc. Remember this bug happens in release mode, so make sure to test with mincresample executable built in release mode. This PR updates the test for mincresample