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 =========================================================================*/
32 #ifndef vtkImageMask_h
33 #define vtkImageMask_h
34 
35 
36 #include "vtkImagingCoreModule.h" // For export macro
38 
40 {
41 public:
42  static vtkImageMask *New();
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
47 
48  void SetMaskedOutputValue(int num, double *v);
49  void SetMaskedOutputValue(double v) {this->SetMaskedOutputValue(1, &v);}
50  void SetMaskedOutputValue(double v1, double v2)
51  {double v[2]; v[0]=v1; v[1]=v2; this->SetMaskedOutputValue(2, v);}
52  void SetMaskedOutputValue(double v1, double v2, double v3)
53  {double v[3]; v[0]=v1; v[1]=v2; v[2]=v3; this->SetMaskedOutputValue(3, v);}
54  double *GetMaskedOutputValue() {return this->MaskedOutputValue;}
55  int GetMaskedOutputValueLength() {return this->MaskedOutputValueLength;}
57 
59 
62  vtkSetClampMacro ( MaskAlpha, double, 0.0, 1.0 );
63  vtkGetMacro ( MaskAlpha, double );
65 
67  void SetImageInputData(vtkImageData *in);
68 
70  void SetMaskInputData(vtkImageData *in);
71 
73 
77  vtkSetMacro(NotMask,int);
78  vtkGetMacro(NotMask,int);
79  vtkBooleanMacro(NotMask, int);
81 
83 
84  virtual void SetInput1Data(vtkDataObject *in) { this->SetInputData(0,in); }
85  virtual void SetInput2Data(vtkDataObject *in) { this->SetInputData(1,in); }
87 
88 protected:
89  vtkImageMask();
90  ~vtkImageMask();
91 
94  int NotMask;
95  double MaskAlpha;
96 
97  virtual int RequestInformation (vtkInformation *,
100 
101 
102  virtual void ThreadedRequestData(vtkInformation *request,
103  vtkInformationVector **inputVector,
104  vtkInformationVector *outputVector,
105  vtkImageData ***inData,
106  vtkImageData **outData,
107  int extent[6], int threadId);
108 
109 private:
110  vtkImageMask(const vtkImageMask&); // Not implemented.
111  void operator=(const vtkImageMask&); // Not implemented.
112 };
113 
114 #endif
115 
116 
117 
double * GetMaskedOutputValue()
Definition: vtkImageMask.h:54
void SetMaskedOutputValue(double v1, double v2, double v3)
Definition: vtkImageMask.h:52
Store vtkAlgorithm input/output information.
double * MaskedOutputValue
Definition: vtkImageMask.h:92
double MaskAlpha
Definition: vtkImageMask.h:95
void SetMaskedOutputValue(double v1, double v2)
Definition: vtkImageMask.h:50
virtual void SetInput1Data(vtkDataObject *in)
Definition: vtkImageMask.h:84
void SetInputData(vtkDataObject *)
Combines a mask and an image.
Definition: vtkImageMask.h:39
int MaskedOutputValueLength
Definition: vtkImageMask.h:93
void PrintSelf(ostream &os, vtkIndent indent)
int GetMaskedOutputValueLength()
Definition: vtkImageMask.h:55
Generic filter that has one input..
void SetMaskedOutputValue(double v)
Definition: vtkImageMask.h:49
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTKIMAGINGCORE_EXPORT
virtual void SetInput2Data(vtkDataObject *in)
Definition: vtkImageMask.h:85
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
general representation of visualization data
Definition: vtkDataObject.h:64