Skip to content
Snippets Groups Projects

Don't fail if sform/qform don't match

Merged Paul McCarthy requested to merge rf/remove-sqform-check into master
1 file
+ 5
7
Compare changes
  • Side-by-side
  • Inline
+ 5
7
@@ -526,15 +526,13 @@ float ApplyWarpHelper::hist_mode(vector<float> vec)
}
NEWMAT::Matrix ApplyWarpHelper::get_and_confirm_s_qform(const NEWIMAGE::volume<float>& vol,
const std::string& fname)
const std::string& fname)
{
NEWMAT::Matrix sform = vol.sform_mat();
NEWMAT::Matrix qform = vol.qform_mat();
if ((sform - qform).NormFrobenius() > 1e-6) {
cerr << "sform and qform not identical in image " << fname << endl;
exit(EXIT_FAILURE);
if ((vol.sform_code() + vol.qform_code()) == 0) {
std::cerr << "sform/qform codes are unknown - using scaling matrix (" << fname << ")" << std::endl;
}
return(sform);
return vol.newimagevox2mm_mat();
}
// This ought to be really simple, but because of the peculiarities of apply_warp it must
Loading