Skip to content

Commit

Permalink
Merge pull request #770 from captainnova/development
Browse files Browse the repository at this point in the history
issue 769: Mildly relax the check for bvec components > 1.
  • Loading branch information
captainnova authored Dec 22, 2023
2 parents b040b44 + 6611fa6 commit 852e5ed
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion console/nii_dicom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4040,7 +4040,13 @@ void _update_tvd(struct TVolumeDiffusion *ptvd) {
return; //no B=0
if (isReady) {
for (int i = 1; i < 4; ++i) {
if (ptvd->_dtiV[i] > 1) {
// Check that _dtiV is not still at its default of [-1, 2, 2, 2] from
// clear_volume(struct TVolumeDiffusion *ptvd). This is mostly avoided
// because of the ptvd->_dtiV[0] >= 0 check above, but was supposedly
// needed at some point.
// issue 769: some bvec components may be slightly (~5%) > 1. AFAIK,
// the relevant value to guard against would be +2.
if (ptvd->_dtiV[i] > 1.5) {
isReady = false;
break;
}
Expand Down

0 comments on commit 852e5ed

Please sign in to comment.