FreeMat

- Main Page
- Related Pages

vtkImageMask

Section: Visualization Toolkit Imaging Classes

# Usage

vtkImageMask combines a mask with an image. Non zero mask implies the output pixel will be the same as the image. If a mask pixel is zero, then the output pixel is set to "MaskedValue". The filter also has the option to pass the mask through a boolean not operation before processing the image. This reverses the passed and replaced pixels. The two inputs should have the same "WholeExtent". The mask input should be unsigned char, and the image scalar type is the same as the output scalar type.

To create an instance of class vtkImageMask, simply invoke its constructor as follows

      obj = vtkImageMask

# Methods

The class vtkImageMask has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkImageMask class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkImageMask = obj.NewInstance ()`
- `vtkImageMask = obj.SafeDownCast (vtkObject o)`
- `obj.SetMaskedOutputValue (int num, double v)` - SetGet the value of the output pixel replaced by mask.
- `obj.SetMaskedOutputValue (double v)` - SetGet the value of the output pixel replaced by mask.
- `obj.SetMaskedOutputValue (double v1, double v2)` - SetGet the value of the output pixel replaced by mask.
- `obj.SetMaskedOutputValue (double v1, double v2, double v3)` - SetGet the value of the output pixel replaced by mask.
- `int = obj.GetMaskedOutputValueLength ()` - Set/Get the alpha blending value for the mask The input image is assumed to be at alpha = 1.0 and the mask image uses this alpha to blend using an over operator.
- `obj.SetMaskAlpha (double )` - Set/Get the alpha blending value for the mask The input image is assumed to be at alpha = 1.0 and the mask image uses this alpha to blend using an over operator.
- `double = obj.GetMaskAlphaMinValue ()` - Set/Get the alpha blending value for the mask The input image is assumed to be at alpha = 1.0 and the mask image uses this alpha to blend using an over operator.
- `double = obj.GetMaskAlphaMaxValue ()` - Set/Get the alpha blending value for the mask The input image is assumed to be at alpha = 1.0 and the mask image uses this alpha to blend using an over operator.
- `double = obj.GetMaskAlpha ()` - Set/Get the alpha blending value for the mask The input image is assumed to be at alpha = 1.0 and the mask image uses this alpha to blend using an over operator.
- `obj.SetImageInput (vtkImageData in)` - Set the input to be masked.
- `obj.SetMaskInput (vtkImageData in)` - Set the mask to be used.
- `obj.SetNotMask (int )` - When Not Mask is on, the mask is passed through a boolean not before it is used to mask the image. The effect is to pass the pixels where the input mask is zero, and replace the pixels where the input value is non zero.
- `int = obj.GetNotMask ()` - When Not Mask is on, the mask is passed through a boolean not before it is used to mask the image. The effect is to pass the pixels where the input mask is zero, and replace the pixels where the input value is non zero.
- `obj.NotMaskOn ()` - When Not Mask is on, the mask is passed through a boolean not before it is used to mask the image. The effect is to pass the pixels where the input mask is zero, and replace the pixels where the input value is non zero.
- `obj.NotMaskOff ()` - When Not Mask is on, the mask is passed through a boolean not before it is used to mask the image. The effect is to pass the pixels where the input mask is zero, and replace the pixels where the input value is non zero.
- `obj.SetInput1 (vtkDataObject in)` - Set the two inputs to this filter
- `obj.SetInput2 (vtkDataObject in)`