VTK
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 "vtkImagingStencilModule.h" // For export macro
35 #include "vtkImageAlgorithm.h"
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);};
70  {this->SetOutputScalarType(VTK_UNSIGNED_INT);};
71  void SetOutputScalarTypeToLong(){this->SetOutputScalarType(VTK_LONG);};
73  {this->SetOutputScalarType(VTK_UNSIGNED_LONG);};
74  void SetOutputScalarTypeToShort(){this->SetOutputScalarType(VTK_SHORT);};
76  {this->SetOutputScalarType(VTK_UNSIGNED_SHORT);};
78  {this->SetOutputScalarType(VTK_UNSIGNED_CHAR);};
80  {this->SetOutputScalarType(VTK_CHAR);};
82 
83 protected:
85  ~vtkImageStencilToImage() override;
86 
89  vtkInformationVector *) override;
90 
93  vtkInformationVector *) override;
94 
95  double OutsideValue;
96  double InsideValue;
98 
99  int FillInputPortInformation(int, vtkInformation*) override;
100 
101 private:
103  void operator=(const vtkImageStencilToImage&) = delete;
104 };
105 
106 #endif
vtkImageAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
vtkImageStencilToImage::SetOutputScalarTypeToUnsignedShort
void SetOutputScalarTypeToUnsignedShort()
Definition: vtkImageStencilToImage.h:75
vtkImageStencilToImage::SetOutputScalarTypeToInt
void SetOutputScalarTypeToInt()
Definition: vtkImageStencilToImage.h:68
VTK_UNSIGNED_INT
#define VTK_UNSIGNED_INT
Definition: vtkType.h:55
vtkImageStencilToImage::OutputScalarType
int OutputScalarType
Definition: vtkImageStencilToImage.h:97
vtkImageStencilToImage::SetOutputScalarTypeToDouble
void SetOutputScalarTypeToDouble()
Definition: vtkImageStencilToImage.h:67
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
VTK_UNSIGNED_SHORT
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:53
vtkImageAlgorithm.h
vtkImageStencilToImage::SetOutputScalarTypeToUnsignedLong
void SetOutputScalarTypeToUnsignedLong()
Definition: vtkImageStencilToImage.h:72
vtkImageStencilToImage::SetOutputScalarTypeToLong
void SetOutputScalarTypeToLong()
Definition: vtkImageStencilToImage.h:71
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:40
vtkImageStencilToImage::SetOutputScalarTypeToUnsignedChar
void SetOutputScalarTypeToUnsignedChar()
Definition: vtkImageStencilToImage.h:77
vtkImageStencilToImage::InsideValue
double InsideValue
Definition: vtkImageStencilToImage.h:96
vtkImageStencilToImage::SetOutputScalarTypeToFloat
void SetOutputScalarTypeToFloat()
Definition: vtkImageStencilToImage.h:66
vtkImageAlgorithm::RequestInformation
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkImageStencilToImage::OutsideValue
double OutsideValue
Definition: vtkImageStencilToImage.h:95
VTK_CHAR
#define VTK_CHAR
Definition: vtkType.h:49
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
VTK_FLOAT
#define VTK_FLOAT
Definition: vtkType.h:58
VTK_DOUBLE
#define VTK_DOUBLE
Definition: vtkType.h:59
VTK_UNSIGNED_CHAR
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:51
VTK_LONG
#define VTK_LONG
Definition: vtkType.h:56
vtkImageStencilToImage::SetOutputScalarTypeToUnsignedInt
void SetOutputScalarTypeToUnsignedInt()
Definition: vtkImageStencilToImage.h:69
VTK_UNSIGNED_LONG
#define VTK_UNSIGNED_LONG
Definition: vtkType.h:57
vtkImageStencilToImage::SetOutputScalarTypeToChar
void SetOutputScalarTypeToChar()
Definition: vtkImageStencilToImage.h:79
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkImageAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkAlgorithm::New
static vtkAlgorithm * New()
VTK_SHORT
#define VTK_SHORT
Definition: vtkType.h:52
vtkImageStencilToImage::SetOutputScalarTypeToShort
void SetOutputScalarTypeToShort()
Definition: vtkImageStencilToImage.h:74
vtkImageStencilToImage
Convert an image stencil into an image.
Definition: vtkImageStencilToImage.h:37
VTK_INT
#define VTK_INT
Definition: vtkType.h:54
vtkImageAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.