VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Imaging
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 "
vtkThreadedImageAlgorithm.h
"
34
35
class
vtkDoubleArray
;
36
class
VTK_IMAGING_EXPORT
vtkImageWeightedSum
:
public
vtkThreadedImageAlgorithm
37
{
38
public
:
39
static
vtkImageWeightedSum
*
New
();
40
vtkTypeMacro(
vtkImageWeightedSum
,
vtkThreadedImageAlgorithm
);
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
:
67
vtkImageWeightedSum
();
68
~
vtkImageWeightedSum
();
69
70
// Array to hold all the weights
71
vtkDoubleArray
*
Weights
;
72
73
// Boolean flag to divide by sum or not
74
int
NormalizeByWeight
;
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
);
85
int
FillInputPortInformation
(
int
i,
vtkInformation
*
info
);
86
87
private
:
88
vtkImageWeightedSum
(
const
vtkImageWeightedSum
&);
// Not implemented.
89
void
operator=(
const
vtkImageWeightedSum
&);
// Not implemented.
90
};
91
92
#endif
93
Generated on Wed May 30 2012 13:22:14 for VTK by
1.8.1