VTK  9.3.1
vtkImageStencilToImage.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
19 #ifndef vtkImageStencilToImage_h
20 #define vtkImageStencilToImage_h
21 
22 #include "vtkImageAlgorithm.h"
23 #include "vtkImagingStencilModule.h" // For export macro
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class VTKIMAGINGSTENCIL_EXPORT vtkImageStencilToImage : public vtkImageAlgorithm
27 {
28 public:
29  static vtkImageStencilToImage* New();
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
34 
37  vtkSetMacro(OutsideValue, double);
38  vtkGetMacro(OutsideValue, double);
40 
42 
45  vtkSetMacro(InsideValue, double);
46  vtkGetMacro(InsideValue, double);
48 
50 
53  vtkSetMacro(OutputScalarType, int);
54  vtkGetMacro(OutputScalarType, int);
55  void SetOutputScalarTypeToFloat() { this->SetOutputScalarType(VTK_FLOAT); }
56  void SetOutputScalarTypeToDouble() { this->SetOutputScalarType(VTK_DOUBLE); }
57  void SetOutputScalarTypeToInt() { this->SetOutputScalarType(VTK_INT); }
58  void SetOutputScalarTypeToUnsignedInt() { this->SetOutputScalarType(VTK_UNSIGNED_INT); }
59  void SetOutputScalarTypeToLong() { this->SetOutputScalarType(VTK_LONG); }
60  void SetOutputScalarTypeToUnsignedLong() { this->SetOutputScalarType(VTK_UNSIGNED_LONG); }
61  void SetOutputScalarTypeToShort() { this->SetOutputScalarType(VTK_SHORT); }
62  void SetOutputScalarTypeToUnsignedShort() { this->SetOutputScalarType(VTK_UNSIGNED_SHORT); }
63  void SetOutputScalarTypeToUnsignedChar() { this->SetOutputScalarType(VTK_UNSIGNED_CHAR); }
64  void SetOutputScalarTypeToChar() { this->SetOutputScalarType(VTK_CHAR); }
66 
67 protected:
69  ~vtkImageStencilToImage() override;
70 
72 
74 
75  double OutsideValue;
76  double InsideValue;
78 
79  int FillInputPortInformation(int, vtkInformation*) override;
80 
81 private:
83  void operator=(const vtkImageStencilToImage&) = delete;
84 };
85 
86 VTK_ABI_NAMESPACE_END
87 #endif
void SetOutputScalarTypeToUnsignedChar()
The desired output scalar type.
#define VTK_UNSIGNED_INT
Definition: vtkType.h:39
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:37
void SetOutputScalarTypeToUnsignedShort()
The desired output scalar type.
Convert an image stencil into an image.
#define VTK_DOUBLE
Definition: vtkType.h:43
#define VTK_FLOAT
Definition: vtkType.h:42
void SetOutputScalarTypeToInt()
The desired output scalar type.
void SetOutputScalarTypeToFloat()
The desired output scalar type.
a simple class to control print indentation
Definition: vtkIndent.h:28
void SetOutputScalarTypeToLong()
The desired output scalar type.
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
void SetOutputScalarTypeToDouble()
The desired output scalar type.
#define VTK_SHORT
Definition: vtkType.h:36
#define VTK_CHAR
Definition: vtkType.h:33
#define VTK_LONG
Definition: vtkType.h:40
void SetOutputScalarTypeToUnsignedInt()
The desired output scalar type.
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:35
void SetOutputScalarTypeToShort()
The desired output scalar type.
int FillInputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
Generic algorithm superclass for image algs.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:41
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
void SetOutputScalarTypeToUnsignedLong()
The desired output scalar type.
void SetOutputScalarTypeToChar()
The desired output scalar type.
#define VTK_INT
Definition: vtkType.h:38