VTK
vtkImageWeightedSum.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageWeightedSum.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
30 #ifndef vtkImageWeightedSum_h
31 #define vtkImageWeightedSum_h
32 
33 #include "vtkImagingMathModule.h" // For export macro
35 
36 class vtkDoubleArray;
38 {
39 public:
40  static vtkImageWeightedSum *New();
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
45 
47  virtual void SetWeights(vtkDoubleArray*);
48  vtkGetObjectMacro(Weights, vtkDoubleArray);
50 
52  virtual void SetWeight(vtkIdType id, double weight);
53 
55 
59  vtkGetMacro(NormalizeByWeight, int);
60  vtkSetClampMacro(NormalizeByWeight, int, 0, 1);
61  vtkBooleanMacro(NormalizeByWeight, int);
63 
65  double CalculateTotalWeight();
66 
67 protected:
70 
71  // Array to hold all the weights
73 
74  // Boolean flag to divide by sum or not
76 
77  int RequestInformation (vtkInformation * vtkNotUsed(request),
78  vtkInformationVector** vtkNotUsed( inputVector ),
79  vtkInformationVector *outputVector);
80 
81  void ThreadedRequestData (vtkInformation* request,
82  vtkInformationVector** inputVector,
83  vtkInformationVector* outputVector,
84  vtkImageData ***inData, vtkImageData **outData,
85  int ext[6], int id);
87 
88 private:
89  vtkImageWeightedSum(const vtkImageWeightedSum&); // Not implemented.
90  void operator=(const vtkImageWeightedSum&); // Not implemented.
91 };
92 
93 #endif
94 
Store vtkAlgorithm input/output information.
int vtkIdType
Definition: vtkType.h:275
void PrintSelf(ostream &os, vtkIndent indent)
dynamic, self-adjusting array of double
Generic filter that has one input..
adds any number of images, weighting each according to the weight set using this->SetWeights(i,w).
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual int FillInputPortInformation(int port, vtkInformation *info)
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
vtkDoubleArray * Weights
#define VTKIMAGINGMATH_EXPORT