Skip to content

Commit

Permalink
Merge pull request #138 from pnlbwh/bzero-thresh
Browse files Browse the repository at this point in the history
Declare bmax outside for loop
  • Loading branch information
tashrifbillah authored Jan 27, 2021
2 parents 751cc1a + effcd4e commit 2c859b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ukf/dwi_normalize.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ void dwiNormalize(const Nrrd *raw, Nrrd *& normalized)

// Process the key/value pairs. Identify the non-zero gradients, namely the non-zero B values
std::vector<std::pair<std::string, std::string> > keyValuePairsOfRaw;
std::vector<bool> nonZeroGradientFlag;
std::vector<bool> nonZeroGradientFlag;

int bmax;

for( unsigned int i = 0; i < nrrdKeyValueSize(raw); i++ )
{
char *key;
Expand All @@ -58,7 +61,6 @@ void dwiNormalize(const Nrrd *raw, Nrrd *& normalized)
std::string keyStr(key);

// Obtain DWMRI_b-value
int bmax;
if( keyStr.length() == 13 && !keyStr.compare("DWMRI_b-value") )
{
sscanf(value, "%d", &bmax);
Expand Down

0 comments on commit 2c859b3

Please sign in to comment.