VTK  9.2.6
vtkImageStencilToImage.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageStencilToImage.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 =========================================================================*/
31 #ifndef vtkImageStencilToImage_h
32 #define vtkImageStencilToImage_h
33 
34 #include "vtkImageAlgorithm.h"
35 #include "vtkImagingStencilModule.h" // For export macro
36 
37 class VTKIMAGINGSTENCIL_EXPORT vtkImageStencilToImage : public vtkImageAlgorithm
38 {
39 public:
40  static vtkImageStencilToImage* New();
42  void PrintSelf(ostream& os, vtkIndent indent) override;
43 
45 
48  vtkSetMacro(OutsideValue, double);
49  vtkGetMacro(OutsideValue, double);
51 
53 
56  vtkSetMacro(InsideValue, double);
57  vtkGetMacro(InsideValue, double);
59 
61 
64  vtkSetMacro(OutputScalarType, int);
65  vtkGetMacro(OutputScalarType, int);
66  void SetOutputScalarTypeToFloat() { this->SetOutputScalarType(VTK_FLOAT); }
67  void SetOutputScalarTypeToDouble() { this->SetOutputScalarType(VTK_DOUBLE); }
68  void SetOutputScalarTypeToInt() { this->SetOutputScalarType(VTK_INT); }
69  void SetOutputScalarTypeToUnsignedInt() { this->SetOutputScalarType(VTK_UNSIGNED_INT); }
70  void SetOutputScalarTypeToLong() { this->SetOutputScalarType(VTK_LONG); }
71  void SetOutputScalarTypeToUnsignedLong() { this->SetOutputScalarType(VTK_UNSIGNED_LONG); }
72  void SetOutputScalarTypeToShort() { this->SetOutputScalarType(VTK_SHORT); }
73  void SetOutputScalarTypeToUnsignedShort() { this->SetOutputScalarType(VTK_UNSIGNED_SHORT); }
74  void SetOutputScalarTypeToUnsignedChar() { this->SetOutputScalarType(VTK_UNSIGNED_CHAR); }
75  void SetOutputScalarTypeToChar() { this->SetOutputScalarType(VTK_CHAR); }
77 
78 protected:
80  ~vtkImageStencilToImage() override;
81 
83 
85 
86  double OutsideValue;
87  double InsideValue;
89 
90  int FillInputPortInformation(int, vtkInformation*) override;
91 
92 private:
94  void operator=(const vtkImageStencilToImage&) = delete;
95 };
96 
97 #endif
void SetOutputScalarTypeToUnsignedChar()
The desired output scalar type.
#define VTK_UNSIGNED_INT
Definition: vtkType.h:51
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:49
void SetOutputScalarTypeToUnsignedShort()
The desired output scalar type.
Convert an image stencil into an image.
#define VTK_DOUBLE
Definition: vtkType.h:55
#define VTK_FLOAT
Definition: vtkType.h:54
void SetOutputScalarTypeToInt()
The desired output scalar type.
void SetOutputScalarTypeToFloat()
The desired output scalar type.
a simple class to control print indentation
Definition: vtkIndent.h:39
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:48
#define VTK_CHAR
Definition: vtkType.h:45
#define VTK_LONG
Definition: vtkType.h:52
void SetOutputScalarTypeToUnsignedInt()
The desired output scalar type.
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:47
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:53
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:50