ITK  5.3.0 Insight Toolkit

#include <itkAddImageFilter.h>

## Detailed Description

This class is templated over the types of the two input images and the type of the output image. Numeric conversions (castings) are done by the C++ defaults.

The pixel type of the input 1 image must have a valid definition of the operator+ with a pixel type of the image 2. This condition is required because internally this filter will perform the operation

pixel_from_image_1 + pixel_from_image_2

Additionally the type resulting from the sum, will be cast to the pixel type of the output image.

The total operation over one pixel will be

output_pixel = static_cast<OutputPixelType>( input1_pixel + input2_pixel )

For example, this filter could be used directly for adding images whose pixels are vectors of the same dimension, and to store the resulting vector in an output image of vector pixels.

The images to be added are set using the methods:

SetInput1( image1 );
SetInput2( image2 );

Additionally, this filter can be used to add a constant to every pixel of an image by using

SetInput1( image1 );
SetConstant2( constant );
Warning
No numeric overflow checking is performed in this filter.
ITK Sphinx Examples:

The documentation for this class was generated from the following file: