-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
antsAverageImages error #35
Comments
Corrected: antsAverageImages = function (imageList, normalize = FALSE) |
If the help file for this function had a reproducible example, this bug would have been caught automatically by Travis. |
agreed - the example should be added brian On Tue, Mar 24, 2015 at 10:22 AM, bkandel notifications@github.com wrote:
|
Normalization step was missing in fix above: antsAverageImages = function (imageList, normalize = FALSE) |
The fix I pushed took care of this: 3e97beb |
Good, cause mine above is not good enough, needed another fix. |
It doesn't seem the variable "template" is needed for anything.
average = antsAverageImages(trn.imgCon, normalize = T)
Error: object 'template' not found
function (imageList, normalize = FALSE)
{
avg <- imageList[[1]] * 0
for (i in imageList) {
if (normalize) {
i <- i/mean(i)
}
template <- template + i
}
avg <- avg/length(imageList)
return(avg)
}
<environment: namespace:ANTsR>
The text was updated successfully, but these errors were encountered: