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