VTK  9.3.20240418
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
52 #ifndef vtkPointOccupancyFilter_h
53 #define vtkPointOccupancyFilter_h
54 
55 #include "vtkFiltersPointsModule.h" // For export macro
56 #include "vtkImageAlgorithm.h"
57 
58 VTK_ABI_NAMESPACE_BEGIN
59 class VTKFILTERSPOINTS_EXPORT vtkPointOccupancyFilter : public vtkImageAlgorithm
60 {
61 public:
63 
69  void PrintSelf(ostream& os, vtkIndent indent) override;
71 
73 
77  void SetSampleDimensions(int i, int j, int k);
78  void SetSampleDimensions(int dim[3]);
79  vtkGetVectorMacro(SampleDimensions, int, 3);
81 
83 
89  vtkSetVector6Macro(ModelBounds, double);
90  vtkGetVectorMacro(ModelBounds, double, 6);
92 
94 
99  vtkSetMacro(EmptyValue, unsigned char);
100  vtkGetMacro(EmptyValue, unsigned char);
101  vtkSetMacro(OccupiedValue, unsigned char);
102  vtkGetMacro(OccupiedValue, unsigned char);
104 
105 protected:
108 
109  int SampleDimensions[3]; // dimensions of volume over which to compute occupancy
110  double ModelBounds[6]; // bounding box defining image
111  double Origin[3], Spacing[3]; // output geometry
112  unsigned char EmptyValue; // what value indicates a voxel is empty
113  unsigned char OccupiedValue; // what value indicates a voxel is occupied
114 
118 
119  void ComputeModelBounds(vtkDataSet* input, vtkImageData* output, vtkInformation* outInfo);
120 
121 private:
123  void operator=(const vtkPointOccupancyFilter&) = delete;
124 };
125 
126 VTK_ABI_NAMESPACE_END
127 #endif
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
Generic algorithm superclass for image algs.
topologically and geometrically regular array of data
Definition: vtkImageData.h:156
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
produce occupancy bit mask from input point cloud
void PrintSelf(ostream &os, vtkIndent indent) override
Standard methods for instantiating, obtaining type information, and printing information.
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
~vtkPointOccupancyFilter() override
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called in response to a REQUEST_DATA request from the executive.
void SetSampleDimensions(int dim[3])
Set / get the dimensions of the occupancy volume.
void SetSampleDimensions(int i, int j, int k)
Set / get the dimensions of the occupancy volume.
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 ComputeModelBounds(vtkDataSet *input, vtkImageData *output, vtkInformation *outInfo)
static vtkPointOccupancyFilter * New()
Standard methods for instantiating, obtaining type information, and printing information.
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447