diff --git a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx index a2bf41a88266..fd70de83a2a2 100644 --- a/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx +++ b/Modules/IO/NIFTI/src/itkNiftiImageIO.cxx @@ -994,6 +994,29 @@ NiftiImageIO::SetImageIOMetadataFromNIfTI() std::ostringstream intent_name; intent_name << nim->intent_name; EncapsulateMetaData(thisDic, "intent_name", intent_name.str()); + + // The below were added after ITK 5.3rc2. + + EncapsulateMetaData(thisDic, "qfac", nim->qfac); + + std::vector qto_xyz; + qto_xyz.push_back(nim->qto_xyz.m[0][0]); + qto_xyz.push_back(nim->qto_xyz.m[0][1]); + qto_xyz.push_back(nim->qto_xyz.m[0][2]); + qto_xyz.push_back(nim->qto_xyz.m[0][3]); + qto_xyz.push_back(nim->qto_xyz.m[1][0]); + qto_xyz.push_back(nim->qto_xyz.m[1][1]); + qto_xyz.push_back(nim->qto_xyz.m[1][2]); + qto_xyz.push_back(nim->qto_xyz.m[1][3]); + qto_xyz.push_back(nim->qto_xyz.m[2][0]); + qto_xyz.push_back(nim->qto_xyz.m[2][1]); + qto_xyz.push_back(nim->qto_xyz.m[2][2]); + qto_xyz.push_back(nim->qto_xyz.m[2][3]); + qto_xyz.push_back(nim->qto_xyz.m[3][0]); + qto_xyz.push_back(nim->qto_xyz.m[3][1]); + qto_xyz.push_back(nim->qto_xyz.m[3][2]); + qto_xyz.push_back(nim->qto_xyz.m[3][3]); + EncapsulateMetaData>(thisDic, "qto_xyz", qto_xyz); } void