VTK
vtkImageThreshold.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageThreshold.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 =========================================================================*/
26 #ifndef __vtkImageThreshold_h
27 #define __vtkImageThreshold_h
28 
29 
31 
33 {
34 public:
35  static vtkImageThreshold *New();
37  void PrintSelf(ostream& os, vtkIndent indent);
38 
40  void ThresholdByUpper(double thresh);
41 
43  void ThresholdByLower(double thresh);
44 
46  void ThresholdBetween(double lower, double upper);
47 
49 
50  vtkSetMacro(ReplaceIn, int);
51  vtkGetMacro(ReplaceIn, int);
52  vtkBooleanMacro(ReplaceIn, int);
54 
56 
57  void SetInValue(double val);
58  vtkGetMacro(InValue, double);
60 
62 
63  vtkSetMacro(ReplaceOut, int);
64  vtkGetMacro(ReplaceOut, int);
65  vtkBooleanMacro(ReplaceOut, int);
67 
69 
70  void SetOutValue(double val);
71  vtkGetMacro(OutValue, double);
73 
75 
76  vtkGetMacro(UpperThreshold, double);
77  vtkGetMacro(LowerThreshold, double);
79 
81 
82  vtkSetMacro(OutputScalarType, int);
83  vtkGetMacro(OutputScalarType, int);
85  {this->SetOutputScalarType(VTK_DOUBLE);}
87  {this->SetOutputScalarType(VTK_FLOAT);}
89  {this->SetOutputScalarType(VTK_LONG);}
91  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
93  {this->SetOutputScalarType(VTK_INT);}
95  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
97  {this->SetOutputScalarType(VTK_SHORT);}
99  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
101  {this->SetOutputScalarType(VTK_CHAR);}
103  {this->SetOutputScalarType(VTK_SIGNED_CHAR);}
105  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
107 
108 protected:
111 
112  double UpperThreshold;
115  double InValue;
117  double OutValue;
118 
120 
122 
123  void ThreadedRequestData(vtkInformation *request,
124  vtkInformationVector **inputVector,
125  vtkInformationVector *outputVector,
126  vtkImageData ***inData, vtkImageData **outData,
127  int extent[6], int id);
128 
129 private:
130  vtkImageThreshold(const vtkImageThreshold&); // Not implemented.
131  void operator=(const vtkImageThreshold&); // Not implemented.
132 };
133 
134 #endif
135 
136 
137 
#define VTK_UNSIGNED_INT
Definition: vtkType.h:32
void SetOutputScalarTypeToUnsignedChar()
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:30
void SetOutputScalarTypeToSignedChar()
void PrintSelf(ostream &os, vtkIndent indent)
Flexible threshold.
#define VTK_DOUBLE
Definition: vtkType.h:36
Generic filter that has one input..
#define VTK_FLOAT
Definition: vtkType.h:35
a simple class to control print indentation
Definition: vtkIndent.h:37
#define VTK_IMAGING_EXPORT
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_SHORT
Definition: vtkType.h:29
void SetOutputScalarTypeToFloat()
#define VTK_CHAR
Definition: vtkType.h:26
#define VTK_LONG
Definition: vtkType.h:33
void SetOutputScalarTypeToDouble()
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
void SetOutputScalarTypeToUnsignedInt()
void SetOutputScalarTypeToLong()
#define VTK_SIGNED_CHAR
Definition: vtkType.h:27
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:28
void SetOutputScalarTypeToUnsignedShort()
void SetOutputScalarTypeToShort()
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:34
#define VTK_INT
Definition: vtkType.h:31
void SetOutputScalarTypeToUnsignedLong()