Skip to content

Commit f0f1c74

Browse files
committed
BUG: Correct the counting logic.
1 parent 63f4b71 commit f0f1c74

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

R/labelImageRegistration.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,13 +196,13 @@ labelImageRegistration <- function( fixedLabelImages, movingLabelImages,
196196
fixedCentersOfMass[count,] <- getCenterOfMass( fixedSingleLabelImage )
197197
movingSingleLabelImage <- thresholdImage( movingLabelImages[[i]], label, label, 1, 0 )
198198
movingCentersOfMass[count,] <- getCenterOfMass( movingSingleLabelImage )
199-
count <- count + 1
200199
if( doDeformable )
201200
{
202-
deformableMultivariateExtras[[i]] <- list( "MSQ", fixedSingleLabelImage,
201+
deformableMultivariateExtras[[count]] <- list( "MSQ", fixedSingleLabelImage,
203202
movingSingleLabelImage,
204-
labelImageWeights[i], 0)
203+
labelImageWeights[i], 0 )
205204
}
205+
count <- count + 1
206206
}
207207
}
208208

0 commit comments

Comments
 (0)