VTK
vtkImageStencil.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageStencil.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 =========================================================================*/
29 #ifndef vtkImageStencil_h
30 #define vtkImageStencil_h
31 
32 #include "vtkImagingStencilModule.h" // For export macro
34 
36 
37 class VTKIMAGINGSTENCIL_EXPORT vtkImageStencil : public vtkThreadedImageAlgorithm
38 {
39 public:
40  static vtkImageStencil *New();
42  void PrintSelf(ostream& os, vtkIndent indent);
43 
45 
50  virtual void SetStencilData(vtkImageStencilData *stencil);
53 
58  {
59  this->SetInputConnection(2, outputPort);
60  }
61 
63 
66  vtkSetMacro(ReverseStencil, int);
67  vtkBooleanMacro(ReverseStencil, int);
68  vtkGetMacro(ReverseStencil, int);
70 
72 
77  virtual void SetBackgroundInputData(vtkImageData *input);
80 
82 
85  void SetBackgroundValue(double val) {
86  this->SetBackgroundColor(val,val,val,val); };
87  double GetBackgroundValue() {
88  return this->BackgroundColor[0]; };
90 
92 
96  vtkSetVector4Macro(BackgroundColor, double);
97  vtkGetVector4Macro(BackgroundColor, double);
99 
100 protected:
103 
105  vtkInformationVector **inputVector,
106  vtkInformationVector *outputVector,
107  vtkImageData ***inData, vtkImageData **outData,
108  int extent[6], int id);
109 
111  double BackgroundColor[4];
112 
114 
115 private:
116  vtkImageStencil(const vtkImageStencil&) VTK_DELETE_FUNCTION;
117  void operator=(const vtkImageStencil&) VTK_DELETE_FUNCTION;
118 };
119 
120 #endif
vtkImageStencil::GetStencil
vtkImageStencilData * GetStencil()
vtkImageStencil::FillInputPortInformation
virtual int FillInputPortInformation(int, vtkInformation *)
Fill the input port information objects for this algorithm.
vtkImageStencil::SetBackgroundInputData
virtual void SetBackgroundInputData(vtkImageData *input)
Set the second input.
vtkImageStencil::SetStencilData
virtual void SetStencilData(vtkImageStencilData *stencil)
Specify the stencil to use.
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkImageStencil::ReverseStencil
int ReverseStencil
Definition: vtkImageStencil.h:110
vtkThreadedImageAlgorithm
Generic filter that has one input.
Definition: vtkThreadedImageAlgorithm.h:44
vtkImageStencil::ThreadedRequestData
void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int id)
If the subclass does not define an Execute method, then the task will be broken up,...
vtkImageStencil::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkImageStencil::GetBackgroundValue
double GetBackgroundValue()
Definition: vtkImageStencil.h:87
vtkThreadedImageAlgorithm.h
vtkImageStencil::~vtkImageStencil
~vtkImageStencil()
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkImageStencil::GetBackgroundInput
vtkImageData * GetBackgroundInput()
vtkImageStencil::SetStencilConnection
void SetStencilConnection(vtkAlgorithmOutput *outputPort)
Specify the stencil to use.
Definition: vtkImageStencil.h:57
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkAlgorithm::SetInputConnection
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkImageStencil
combine images via a cookie-cutter operation
Definition: vtkImageStencil.h:38
vtkImageStencil::New
static vtkImageStencil * New()
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:40
vtkImageStencilData
efficient description of an image stencil
Definition: vtkImageStencilData.h:38
vtkX3D::extent
@ extent
Definition: vtkX3D.h:345
vtkImageStencil::SetBackgroundValue
void SetBackgroundValue(double val)
Set the default output value to use when the second input is not set.
Definition: vtkImageStencil.h:85
vtkImageStencil::vtkImageStencil
vtkImageStencil()