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=========================================================================*/
33#ifndef vtkImageMask_h
34#define vtkImageMask_h
35
36
37#include "vtkImagingCoreModule.h" // For export macro
39
40class VTKIMAGINGCORE_EXPORT vtkImageMask : public vtkThreadedImageAlgorithm
41{
42public:
43 static vtkImageMask *New();
45 void PrintSelf(ostream& os, vtkIndent indent);
46
50 void SetMaskedOutputValue(int num, double *v);
51 void SetMaskedOutputValue(double v) {this->SetMaskedOutputValue(1, &v);}
52 void SetMaskedOutputValue(double v1, double v2)
53 {double v[2]; v[0]=v1; v[1]=v2; this->SetMaskedOutputValue(2, v);}
54 void SetMaskedOutputValue(double v1, double v2, double v3)
55 {double v[3]; v[0]=v1; v[1]=v2; v[2]=v3; this->SetMaskedOutputValue(3, v);}
56 double *GetMaskedOutputValue() {return this->MaskedOutputValue;}
57 int GetMaskedOutputValueLength() {return this->MaskedOutputValueLength;}
58
60
66 vtkSetClampMacro ( MaskAlpha, double, 0.0, 1.0 );
67 vtkGetMacro ( MaskAlpha, double );
69
74
79
81
87 vtkSetMacro(NotMask,int);
88 vtkGetMacro(NotMask,int);
89 vtkBooleanMacro(NotMask, int);
91
95 virtual void SetInput1Data(vtkDataObject *in) { this->SetInputData(0,in); }
96 virtual void SetInput2Data(vtkDataObject *in) { this->SetInputData(1,in); }
97
98protected:
101
105 double MaskAlpha;
106
110
111
112 virtual void ThreadedRequestData(vtkInformation *request,
113 vtkInformationVector **inputVector,
114 vtkInformationVector *outputVector,
115 vtkImageData ***inData,
116 vtkImageData **outData,
117 int extent[6], int threadId);
118
119private:
120 vtkImageMask(const vtkImageMask&) VTK_DELETE_FUNCTION;
121 void operator=(const vtkImageMask&) VTK_DELETE_FUNCTION;
122};
123
124#endif
125
126
127
general representation of visualization data
Definition: vtkDataObject.h:65
void SetInputData(vtkDataObject *)
Assign a data object as input.
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
Combines a mask and an image.
Definition: vtkImageMask.h:41
int MaskedOutputValueLength
Definition: vtkImageMask.h:103
double MaskAlpha
Definition: vtkImageMask.h:105
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
double * GetMaskedOutputValue()
Definition: vtkImageMask.h:56
int GetMaskedOutputValueLength()
Definition: vtkImageMask.h:57
static vtkImageMask * New()
void SetImageInputData(vtkImageData *in)
Set the input to be masked.
double * MaskedOutputValue
Definition: vtkImageMask.h:102
void SetMaskInputData(vtkImageData *in)
Set the mask to be used.
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to collect information from their inputs and set information f...
virtual void SetInput2Data(vtkDataObject *in)
Definition: vtkImageMask.h:96
virtual void SetInput1Data(vtkDataObject *in)
Set the two inputs to this filter.
Definition: vtkImageMask.h:95
void SetMaskedOutputValue(double v1, double v2)
Definition: vtkImageMask.h:52
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
If the subclass does not define an Execute method, then the task will be broken up,...
void SetMaskedOutputValue(double v1, double v2, double v3)
Definition: vtkImageMask.h:54
void SetMaskedOutputValue(int num, double *v)
SetGet the value of the output pixel replaced by mask.
void SetMaskedOutputValue(double v)
Definition: vtkImageMask.h:51
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Generic filter that has one input.
@ extent
Definition: vtkX3D.h:345
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.