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 
32 
34 
36 {
37 public:
38  static vtkImageStencil *New();
40  void PrintSelf(ostream& os, vtkIndent indent);
41 
43 
45  virtual void SetStencil(vtkImageStencilData *stencil);
46  vtkImageStencilData *GetStencil();
48 
50 
51  vtkSetMacro(ReverseStencil, int);
52  vtkBooleanMacro(ReverseStencil, int);
53  vtkGetMacro(ReverseStencil, int);
55 
57 
60  virtual void SetBackgroundInput(vtkImageData *input);
61  vtkImageData *GetBackgroundInput();
63 
65 
66  void SetBackgroundValue(double val) {
67  this->SetBackgroundColor(val,val,val,val); };
68  double GetBackgroundValue() {
69  return this->BackgroundColor[0]; };
71 
73 
75  vtkSetVector4Macro(BackgroundColor, double);
76  vtkGetVector4Macro(BackgroundColor, double);
78 
79 protected:
81  ~vtkImageStencil();
82 
83  void ThreadedRequestData(vtkInformation *request,
84  vtkInformationVector **inputVector,
85  vtkInformationVector *outputVector,
86  vtkImageData ***inData, vtkImageData **outData,
87  int extent[6], int id);
88 
90  double BackgroundColor[4];
91 
92  virtual int FillInputPortInformation(int, vtkInformation*);
93 
94 private:
95  vtkImageStencil(const vtkImageStencil&); // Not implemented.
96  void operator=(const vtkImageStencil&); // Not implemented.
97 };
98 
99 #endif
Store vtkAlgorithm input/output information.
void PrintSelf(ostream &os, vtkIndent indent)
Generic filter that has one input..
a simple class to control print indentation
Definition: vtkIndent.h:37
efficient description of an image stencil
#define VTK_IMAGING_EXPORT
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
void SetBackgroundValue(double val)
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()
double GetBackgroundValue()