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 =========================================================================*/
28 #ifndef vtkImageStencil_h
29 #define vtkImageStencil_h
30 
31 #include "vtkImagingStencilModule.h" // For export macro
33 
35 
37 {
38 public:
39  static vtkImageStencil *New();
41  void PrintSelf(ostream& os, vtkIndent indent);
42 
44 
47  virtual void SetStencilData(vtkImageStencilData *stencil);
48  vtkImageStencilData *GetStencil();
50 
52 
54  {
55  this->SetInputConnection(2, outputPort);
56  }
58 
60 
61  vtkSetMacro(ReverseStencil, int);
62  vtkBooleanMacro(ReverseStencil, int);
63  vtkGetMacro(ReverseStencil, int);
65 
67 
70  virtual void SetBackgroundInputData(vtkImageData *input);
71  vtkImageData *GetBackgroundInput();
73 
75 
76  void SetBackgroundValue(double val) {
77  this->SetBackgroundColor(val,val,val,val); };
78  double GetBackgroundValue() {
79  return this->BackgroundColor[0]; };
81 
83 
85  vtkSetVector4Macro(BackgroundColor, double);
86  vtkGetVector4Macro(BackgroundColor, double);
88 
89 protected:
91  ~vtkImageStencil();
92 
93  void ThreadedRequestData(vtkInformation *request,
94  vtkInformationVector **inputVector,
95  vtkInformationVector *outputVector,
96  vtkImageData ***inData, vtkImageData **outData,
97  int extent[6], int id);
98 
100  double BackgroundColor[4];
101 
102  virtual int FillInputPortInformation(int, vtkInformation*);
103 
104 private:
105  vtkImageStencil(const vtkImageStencil&); // Not implemented.
106  void operator=(const vtkImageStencil&); // Not implemented.
107 };
108 
109 #endif
Store vtkAlgorithm input/output information.
void PrintSelf(ostream &os, vtkIndent indent)
Proxy object to connect input/output ports.
#define VTKIMAGINGSTENCIL_EXPORT
Generic filter that has one input..
a simple class to control print indentation
Definition: vtkIndent.h:38
efficient description of an image stencil
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
void SetBackgroundValue(double val)
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
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)
combine images via a cookie-cutter operation
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void SetStencilConnection(vtkAlgorithmOutput *outputPort)
double GetBackgroundValue()