VTK
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
dox
Imaging
vtkImageBlend.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: Visualization Toolkit
4
Module: vtkImageBlend.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
=========================================================================*/
76
#ifndef __vtkImageBlend_h
77
#define __vtkImageBlend_h
78
79
80
#include "
vtkThreadedImageAlgorithm.h
"
81
82
class
vtkImageStencilData
;
83
84
#define VTK_IMAGE_BLEND_MODE_NORMAL 0
85
#define VTK_IMAGE_BLEND_MODE_COMPOUND 1
86
87
class
VTK_IMAGING_EXPORT
vtkImageBlend
:
public
vtkThreadedImageAlgorithm
88
{
89
public
:
90
static
vtkImageBlend
*
New
();
91
vtkTypeMacro(
vtkImageBlend
,
vtkThreadedImageAlgorithm
);
92
void
PrintSelf
(ostream& os,
vtkIndent
indent);
93
98
virtual
void
ReplaceNthInputConnection(
int
idx,
vtkAlgorithmOutput
* input);
99
101
105
void
SetInput
(
int
num,
vtkDataObject
*input);
106
void
SetInput
(
vtkDataObject
*input) { this->
SetInput
(0, input); };
108
110
113
vtkDataObject
*
GetInput
(
int
num);
114
vtkDataObject
*
GetInput
() {
return
this->
GetInput
(0); };
116
120
int
GetNumberOfInputs
() {
return
this->
GetNumberOfInputConnections
(0); };
121
123
125
void
SetOpacity(
int
idx,
double
opacity);
126
double
GetOpacity(
int
idx);
128
130
131
void
SetStencil(
vtkImageStencilData
*stencil);
132
vtkImageStencilData
*GetStencil();
134
136
137
vtkSetClampMacro(BlendMode,
int
,
138
VTK_IMAGE_BLEND_MODE_NORMAL
,
139
VTK_IMAGE_BLEND_MODE_COMPOUND
);
140
vtkGetMacro(BlendMode,
int
);
141
void
SetBlendModeToNormal()
142
{this->SetBlendMode(
VTK_IMAGE_BLEND_MODE_NORMAL
);};
143
void
SetBlendModeToCompound()
144
{this->SetBlendMode(
VTK_IMAGE_BLEND_MODE_COMPOUND
);};
145
const
char
*GetBlendModeAsString(
void
);
147
149
151
vtkSetMacro(CompoundThreshold,
double
);
152
vtkGetMacro(CompoundThreshold,
double
);
154
155
protected
:
156
vtkImageBlend
();
157
~
vtkImageBlend
();
158
159
virtual
int
RequestUpdateExtent
(
vtkInformation
*,
160
vtkInformationVector
**,
161
vtkInformationVector
*);
162
163
void
InternalComputeInputUpdateExtent(
int
inExt[6],
int
outExt[6],
164
int
inWExtent[6]);
165
166
void
ThreadedRequestData
(
vtkInformation
* request,
167
vtkInformationVector
** inputVector,
168
vtkInformationVector
* outputVector,
169
vtkImageData
***inData,
vtkImageData
**outData,
170
int
ext[6],
int
id
);
171
172
// see vtkAlgorithm for docs.
173
virtual
int
FillInputPortInformation
(
int
,
vtkInformation
*);
174
175
// see vtkAlgorithm for docs.
176
virtual
int
RequestData
(
vtkInformation
* request,
177
vtkInformationVector
** inputVector,
178
vtkInformationVector
* outputVector);
179
180
double
*
Opacity
;
181
int
OpacityArrayLength
;
182
int
BlendMode
;
183
double
CompoundThreshold
;
184
int
DataWasPassed
;
185
186
private
:
187
vtkImageBlend
(
const
vtkImageBlend
&);
// Not implemented.
188
void
operator=(
const
vtkImageBlend
&);
// Not implemented.
189
};
190
192
193
inline
const
char
*
vtkImageBlend::GetBlendModeAsString
()
194
{
195
switch
(this->
BlendMode
)
196
{
197
case
VTK_IMAGE_BLEND_MODE_NORMAL
:
198
return
"Normal"
;
199
case
VTK_IMAGE_BLEND_MODE_COMPOUND
:
200
return
"Compound"
;
201
default
:
202
return
"Unknown Blend Mode"
;
203
}
204
}
206
207
208
#endif
209
210
211
212
Generated on Thu Mar 13 2014 08:10:15 for VTK by
1.8.1.2