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 
34 
35 class vtkDoubleArray;
37 {
38 public:
39  static vtkImageWeightedSum *New();
41  void PrintSelf(ostream& os, vtkIndent indent);
42 
44 
46  virtual void SetWeights(vtkDoubleArray*);
47  vtkGetObjectMacro(Weights, vtkDoubleArray);
49 
51  virtual void SetWeight(vtkIdType id, double weight);
52 
54 
58  vtkGetMacro(NormalizeByWeight, int);
59  vtkSetClampMacro(NormalizeByWeight, int, 0, 1);
60  vtkBooleanMacro(NormalizeByWeight, int);
62 
64  double CalculateTotalWeight();
65 
66 protected:
69 
70  // Array to hold all the weights
72 
73  // Boolean flag to divide by sum or not
75 
76  int RequestInformation (vtkInformation * vtkNotUsed(request),
77  vtkInformationVector** vtkNotUsed( inputVector ),
78  vtkInformationVector *outputVector);
79 
80  void ThreadedRequestData (vtkInformation* request,
81  vtkInformationVector** inputVector,
82  vtkInformationVector* outputVector,
83  vtkImageData ***inData, vtkImageData **outData,
84  int ext[6], int id);
86 
87 private:
88  vtkImageWeightedSum(const vtkImageWeightedSum&); // Not implemented.
89  void operator=(const vtkImageWeightedSum&); // Not implemented.
90 };
91 
92 #endif
93