VTK
vtkImageMask.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageMask.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 vtkImageMask_h
31 #define vtkImageMask_h
32 
33 
34 #include "vtkImagingCoreModule.h" // For export macro
36 
37 class VTKIMAGINGCORE_EXPORT vtkImageMask : public vtkThreadedImageAlgorithm
38 {
39 public:
40  static vtkImageMask *New();
42  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
43 
47  void SetMaskedOutputValue(int num, double *v);
48  void SetMaskedOutputValue(double v) {this->SetMaskedOutputValue(1, &v);}
49  void SetMaskedOutputValue(double v1, double v2)
50  {double v[2]; v[0]=v1; v[1]=v2; this->SetMaskedOutputValue(2, v);}
51  void SetMaskedOutputValue(double v1, double v2, double v3)
52  {double v[3]; v[0]=v1; v[1]=v2; v[2]=v3; this->SetMaskedOutputValue(3, v);}
53  double *GetMaskedOutputValue() {return this->MaskedOutputValue;}
54  int GetMaskedOutputValueLength() {return this->MaskedOutputValueLength;}
55 
57 
63  vtkSetClampMacro ( MaskAlpha, double, 0.0, 1.0 );
64  vtkGetMacro ( MaskAlpha, double );
66 
70  void SetImageInputData(vtkImageData *in);
71 
75  void SetMaskInputData(vtkImageData *in);
76 
78 
84  vtkSetMacro(NotMask,int);
85  vtkGetMacro(NotMask,int);
86  vtkBooleanMacro(NotMask, int);
88 
92  virtual void SetInput1Data(vtkDataObject *in) { this->SetInputData(0,in); }
93  virtual void SetInput2Data(vtkDataObject *in) { this->SetInputData(1,in); }
94 
95 protected:
96  vtkImageMask();
97  ~vtkImageMask() VTK_OVERRIDE;
98 
99  double *MaskedOutputValue;
100  int MaskedOutputValueLength;
101  int NotMask;
102  double MaskAlpha;
103 
104  int RequestInformation (vtkInformation *,
106  vtkInformationVector *) VTK_OVERRIDE;
107 
108 
109  void ThreadedRequestData(vtkInformation *request,
110  vtkInformationVector **inputVector,
111  vtkInformationVector *outputVector,
112  vtkImageData ***inData,
113  vtkImageData **outData,
114  int extent[6], int threadId) VTK_OVERRIDE;
115 
116 private:
117  vtkImageMask(const vtkImageMask&) VTK_DELETE_FUNCTION;
118  void operator=(const vtkImageMask&) VTK_DELETE_FUNCTION;
119 };
120 
121 #endif
122 
123 
124 
double * GetMaskedOutputValue()
Definition: vtkImageMask.h:53
void SetMaskedOutputValue(double v1, double v2, double v3)
Definition: vtkImageMask.h:51
Store vtkAlgorithm input/output information.
void SetMaskedOutputValue(double v1, double v2)
Definition: vtkImageMask.h:49
virtual void SetInput1Data(vtkDataObject *in)
Set the two inputs to this filter.
Definition: vtkImageMask.h:92
void SetInputData(vtkDataObject *)
Assign a data object as input.
Combines a mask and an image.
Definition: vtkImageMask.h:37
int GetMaskedOutputValueLength()
Definition: vtkImageMask.h:54
Generic filter that has one input.
void SetMaskedOutputValue(double v)
Definition: vtkImageMask.h:48
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
virtual void SetInput2Data(vtkDataObject *in)
Definition: vtkImageMask.h:93
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkBooleanMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
general representation of visualization data
Definition: vtkDataObject.h:58