Store Images in a Vector and then Average it

Hey Guys,

I am generating vector images (3 images) iteratively and I would like to know how I can store those images into a vector, or array, of images, and average those 3 images to save only the final averaged one.
Thanks for now!

Storing into a vector is easy:

std::vector<ImageType::Pointer> images;
for (...) {images.push_back(image);}

As for averaging, take a look at the suggestion here.

1 Like

Great… that was I was looking for.
Thanks, man.