VTK  9.3.1
vtkPointOccupancyFilter.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
33 #ifndef vtkPointOccupancyFilter_h
34 #define vtkPointOccupancyFilter_h
35 
36 #include "vtkFiltersPointsModule.h" // For export macro
37 #include "vtkImageAlgorithm.h"
38 
39 VTK_ABI_NAMESPACE_BEGIN
40 class VTKFILTERSPOINTS_EXPORT vtkPointOccupancyFilter : public vtkImageAlgorithm
41 {
42 public:
44 
48  static vtkPointOccupancyFilter* New();
50  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
54 
58  void SetSampleDimensions(int i, int j, int k);
59  void SetSampleDimensions(int dim[3]);
60  vtkGetVectorMacro(SampleDimensions, int, 3);
62 
64 
70  vtkSetVector6Macro(ModelBounds, double);
71  vtkGetVectorMacro(ModelBounds, double, 6);
73 
75 
80  vtkSetMacro(EmptyValue, unsigned char);
81  vtkGetMacro(EmptyValue, unsigned char);
82  vtkSetMacro(OccupiedValue, unsigned char);
83  vtkGetMacro(OccupiedValue, unsigned char);
85 
86 protected:
88  ~vtkPointOccupancyFilter() override;
89 
90  int SampleDimensions[3]; // dimensions of volume over which to compute occupancy
91  double ModelBounds[6]; // bounding box defining image
92  double Origin[3], Spacing[3]; // output geometry
93  unsigned char EmptyValue; // what value indicates a voxel is empty
94  unsigned char OccupiedValue; // what value indicates a voxel is occupied
95 
99 
100  void ComputeModelBounds(vtkDataSet* input, vtkImageData* output, vtkInformation* outInfo);
101 
102 private:
104  void operator=(const vtkPointOccupancyFilter&) = delete;
105 };
106 
107 VTK_ABI_NAMESPACE_END
108 #endif
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:52
produce occupancy bit mask from input point cloud
a simple class to control print indentation
Definition: vtkIndent.h:28
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
Subclasses can reimplement this method to collect information from their inputs and set information f...
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.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called in response to a REQUEST_DATA request from the executive.