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 
30 #include "vtkImagingCoreModule.h" // For export macro
32 
34 {
35 public:
36  static vtkImageThreshold *New();
38  void PrintSelf(ostream& os, vtkIndent indent);
39 
41  void ThresholdByUpper(double thresh);
42 
44  void ThresholdByLower(double thresh);
45 
47  void ThresholdBetween(double lower, double upper);
48 
50 
51  vtkSetMacro(ReplaceIn, int);
52  vtkGetMacro(ReplaceIn, int);
53  vtkBooleanMacro(ReplaceIn, int);
55 
57 
58  void SetInValue(double val);
59  vtkGetMacro(InValue, double);
61 
63 
64  vtkSetMacro(ReplaceOut, int);
65  vtkGetMacro(ReplaceOut, int);
66  vtkBooleanMacro(ReplaceOut, int);
68 
70 
71  void SetOutValue(double val);
72  vtkGetMacro(OutValue, double);
74 
76 
77  vtkGetMacro(UpperThreshold, double);
78  vtkGetMacro(LowerThreshold, double);
80 
82 
83  vtkSetMacro(OutputScalarType, int);
84  vtkGetMacro(OutputScalarType, int);
86  {this->SetOutputScalarType(VTK_DOUBLE);}
88  {this->SetOutputScalarType(VTK_FLOAT);}
90  {this->SetOutputScalarType(VTK_LONG);}
92  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
94  {this->SetOutputScalarType(VTK_INT);}
96  {this->SetOutputScalarType(VTK_UNSIGNED_INT);}
98  {this->SetOutputScalarType(VTK_SHORT);}
100  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);}
102  {this->SetOutputScalarType(VTK_CHAR);}
104  {this->SetOutputScalarType(VTK_SIGNED_CHAR);}
106  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);}
108 
109 protected:
112 
116  double InValue;
118  double OutValue;
119 
121 
123 
124  void ThreadedRequestData(vtkInformation *request,
125  vtkInformationVector **inputVector,
126  vtkInformationVector *outputVector,
127  vtkImageData ***inData, vtkImageData **outData,
128  int extent[6], int id);
129 
130 private:
131  vtkImageThreshold(const vtkImageThreshold&); // Not implemented.
132  void operator=(const vtkImageThreshold&); // Not implemented.
133 };
134 
135 #endif
136 
137 
138 
#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:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_SHORT
Definition: vtkType.h:29
#define VTKIMAGINGCORE_EXPORT
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()