[Insight-users] What is the mean of SetInput1 and SetInput2 member function of itk::MaskImageFilter class

John Drescher drescherjm at gmail.com
Tue Sep 18 14:20:46 EDT 2012


> Is there anyone know What is the mean of SetInput1 and SetInput2 member
> function of itk::MaskImageFilter class? I go through Itk software guide,
> itkMaskImageFilter.h, http://www.itk.org/Wiki/ITK, but find no answer.
>

I believe Input1 is the image you want masked.
Input2 is the mask.

This was from the detailed description.

template<class TInputImage, class TMaskImage, class TOutputImage = TInputImage>
class itk::MaskImageFilter< TInputImage, TMaskImage, TOutputImage >

Mask an image with a mask. image with the mask.

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

The pixel type of the input 2 image must have a valid definition of
the operator != with zero. This condition is required because
internally this filter will perform the operation
if pixel_from_mask_image != 0
pixel_output_image = pixel_input_image
else
pixel_output_image = outside_value

The pixel from the input 1 is cast to the pixel type of the output image.

Note that the input and the mask images must be of the same size.

John


More information about the Insight-users mailing list