Skip to content

bids_FullPipelineTest: Nifti comparisons have unequal data format #712

@HenkMutsaerts

Description

@HenkMutsaerts

Description

Nifti comparisons can have unequal data format. Line 107 of xASL_im_CompareNifti assumes that the image matrices loaded from NIfTIs have equal data format, so this crashes when this is not the case. Can be solved by checking if the data format of the images is equal first.

This issue was raised when running xASL_test_Flavors(pathExploreASL, pathTest, [0 0 1 0 0 0 0], x); for Siemens_PCASL_multiTI. Somehow the ASL4D of TmpConversion had uint8 format whereas the TmpReference ASL4D had single format.

I recently changed that xASL_io_SaveNifti automatically stores in lower data formats if this doesn't affect the data quality, and checked but this was not an issue (or at least I couldn't reproduce this by storing this image as new NIfTI). So it seems that my change (merged in 1.7.0) was appropriate.

Release notes

Required: summarize the changes for the release notes here

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions