VTK  9.2.6
vtkVoxelModeller.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkVoxelModeller.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 =========================================================================*/
34 #ifndef vtkVoxelModeller_h
35 #define vtkVoxelModeller_h
36 
37 #include "vtkImageAlgorithm.h"
38 #include "vtkImagingHybridModule.h" // For export macro
39 
40 class VTKIMAGINGHYBRID_EXPORT vtkVoxelModeller : public vtkImageAlgorithm
41 {
42 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
53  static vtkVoxelModeller* New();
54 
58  double ComputeModelBounds(double origin[3], double spacing[3]);
59 
61 
65  void SetSampleDimensions(int i, int j, int k);
66  void SetSampleDimensions(int dim[3]);
67  vtkGetVectorMacro(SampleDimensions, int, 3);
69 
71 
75  vtkSetClampMacro(MaximumDistance, double, 0.0, 1.0);
76  vtkGetMacro(MaximumDistance, double);
78 
80 
84  void SetModelBounds(const double bounds[6]);
85  void SetModelBounds(double xmin, double xmax, double ymin, double ymax, double zmin, double zmax);
86  vtkGetVectorMacro(ModelBounds, double, 6);
88 
90 
96  vtkSetMacro(ScalarType, int);
97  void SetScalarTypeToFloat() { this->SetScalarType(VTK_FLOAT); }
98  void SetScalarTypeToDouble() { this->SetScalarType(VTK_DOUBLE); }
99  void SetScalarTypeToInt() { this->SetScalarType(VTK_INT); }
100  void SetScalarTypeToUnsignedInt() { this->SetScalarType(VTK_UNSIGNED_INT); }
101  void SetScalarTypeToLong() { this->SetScalarType(VTK_LONG); }
102  void SetScalarTypeToUnsignedLong() { this->SetScalarType(VTK_UNSIGNED_LONG); }
103  void SetScalarTypeToShort() { this->SetScalarType(VTK_SHORT); }
104  void SetScalarTypeToUnsignedShort() { this->SetScalarType(VTK_UNSIGNED_SHORT); }
105  void SetScalarTypeToUnsignedChar() { this->SetScalarType(VTK_UNSIGNED_CHAR); }
106  void SetScalarTypeToChar() { this->SetScalarType(VTK_CHAR); }
107  void SetScalarTypeToBit() { this->SetScalarType(VTK_BIT); }
108  vtkGetMacro(ScalarType, int);
110 
112 
119  vtkSetMacro(ForegroundValue, double);
120  vtkGetMacro(ForegroundValue, double);
121  vtkSetMacro(BackgroundValue, double);
122  vtkGetMacro(BackgroundValue, double);
124 
125 protected:
127  ~vtkVoxelModeller() override = default;
128 
130 
131  // see vtkAlgorithm for details
132  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
133  vtkInformationVector* outputVector) override;
134 
135  // see algorithm for more info
136  int FillInputPortInformation(int port, vtkInformation* info) override;
137 
138  int SampleDimensions[3];
140  double ModelBounds[6];
144 
145 private:
146  vtkVoxelModeller(const vtkVoxelModeller&) = delete;
147  void operator=(const vtkVoxelModeller&) = delete;
148 };
149 
150 #endif
#define VTK_UNSIGNED_INT
Definition: vtkType.h:51
Store vtkAlgorithm input/output information.
#define VTK_UNSIGNED_SHORT
Definition: vtkType.h:49
void SetScalarTypeToChar()
Control the scalar type of the output image.
void SetScalarTypeToFloat()
Control the scalar type of the output image.
void SetScalarTypeToInt()
Control the scalar type of the output image.
void SetScalarTypeToDouble()
Control the scalar type of the output image.
void SetScalarTypeToLong()
Control the scalar type of the output image.
void SetScalarTypeToUnsignedInt()
Control the scalar type of the output image.
#define VTK_DOUBLE
Definition: vtkType.h:55
#define VTK_FLOAT
Definition: vtkType.h:54
a simple class to control print indentation
Definition: vtkIndent.h:39
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 SetScalarTypeToBit()
Control the scalar type of the output image.
#define VTK_SHORT
Definition: vtkType.h:48
#define VTK_CHAR
Definition: vtkType.h:45
#define VTK_LONG
Definition: vtkType.h:52
convert an arbitrary dataset to a voxel representation
void SetScalarTypeToShort()
Control the scalar type of the output image.
#define VTK_UNSIGNED_CHAR
Definition: vtkType.h:47
#define VTK_BIT
Definition: vtkType.h:44
int FillInputPortInformation(int port, vtkInformation *info) override
These method should be reimplemented by subclasses that have more than a single input or single outpu...
void SetScalarTypeToUnsignedShort()
Control the scalar type of the output image.
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
void SetScalarTypeToUnsignedLong()
Control the scalar type of the output image.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.
void SetScalarTypeToUnsignedChar()
Control the scalar type of the output image.
#define VTK_INT
Definition: vtkType.h:50