FreeMat

- Main Page
- Related Pages

vtkImageWeightedSum

Section: Visualization Toolkit Imaging Classes

# Usage

All weights are normalized so they will sum to 1. Images must have the same extents. Output is

.SECTION Thanks The original author of this class is Lauren O'Donnell (MIT) for Slicer

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

      obj = vtkImageWeightedSum

# Methods

The class vtkImageWeightedSum 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 vtkImageWeightedSum class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkImageWeightedSum = obj.NewInstance ()`
- `vtkImageWeightedSum = obj.SafeDownCast (vtkObject o)`
- `obj.SetWeights (vtkDoubleArray )` - The weights control the contribution of each input to the sum. They will be normalized to sum to 1 before filter execution.
- `vtkDoubleArray = obj.GetWeights ()` - The weights control the contribution of each input to the sum. They will be normalized to sum to 1 before filter execution.
- `obj.SetWeight (vtkIdType id, double weight)` - Change a specific weight. Reallocation is done
- `int = obj.GetNormalizeByWeight ()` - Setting NormalizeByWeight on will divide the final result by the total weight of the component functions. This process does not otherwise normalize the weighted sum By default, NormalizeByWeight is on.
- `obj.SetNormalizeByWeight (int )` - Setting NormalizeByWeight on will divide the final result by the total weight of the component functions. This process does not otherwise normalize the weighted sum By default, NormalizeByWeight is on.
- `int = obj.GetNormalizeByWeightMinValue ()` - Setting NormalizeByWeight on will divide the final result by the total weight of the component functions. This process does not otherwise normalize the weighted sum By default, NormalizeByWeight is on.
- `int = obj.GetNormalizeByWeightMaxValue ()` - Setting NormalizeByWeight on will divide the final result by the total weight of the component functions. This process does not otherwise normalize the weighted sum By default, NormalizeByWeight is on.
- `obj.NormalizeByWeightOn ()` - Setting NormalizeByWeight on will divide the final result by the total weight of the component functions. This process does not otherwise normalize the weighted sum By default, NormalizeByWeight is on.
- `obj.NormalizeByWeightOff ()` - Setting NormalizeByWeight on will divide the final result by the total weight of the component functions. This process does not otherwise normalize the weighted sum By default, NormalizeByWeight is on.
- `double = obj.CalculateTotalWeight ()` - Compute the total value of all the weight