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 
Store vtkAlgorithm input/output information.
int vtkIdType
Definition: vtkType.h:255
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:37
#define VTK_IMAGING_EXPORT
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
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