VTK  9.2.5
vtkPointOccupancyFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkPointOccupancyFilter.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 =========================================================================*/
64 #ifndef vtkPointOccupancyFilter_h
65 #define vtkPointOccupancyFilter_h
66 
67 #include "vtkFiltersPointsModule.h" // For export macro
68 #include "vtkImageAlgorithm.h"
69 
70 class VTKFILTERSPOINTS_EXPORT vtkPointOccupancyFilter : public vtkImageAlgorithm
71 {
72 public:
74 
80  void PrintSelf(ostream& os, vtkIndent indent) override;
82 
84 
88  void SetSampleDimensions(int i, int j, int k);
89  void SetSampleDimensions(int dim[3]);
90  vtkGetVectorMacro(SampleDimensions, int, 3);
92 
94 
100  vtkSetVector6Macro(ModelBounds, double);
101  vtkGetVectorMacro(ModelBounds, double, 6);
103 
105 
110  vtkSetMacro(EmptyValue, unsigned char);
111  vtkGetMacro(EmptyValue, unsigned char);
112  vtkSetMacro(OccupiedValue, unsigned char);
113  vtkGetMacro(OccupiedValue, unsigned char);
115 
116 protected:
119 
120  int SampleDimensions[3]; // dimensions of volume over which to compute occupancy
121  double ModelBounds[6]; // bounding box defining image
122  double Origin[3], Spacing[3]; // output geometry
123  unsigned char EmptyValue; // what value indicates a voxel is empty
124  unsigned char OccupiedValue; // what value indicates a voxel is occupied
125 
129 
130  void ComputeModelBounds(vtkDataSet* input, vtkImageData* output, vtkInformation* outInfo);
131 
132 private:
134  void operator=(const vtkPointOccupancyFilter&) = delete;
135 };
136 
137 #endif
abstract class to specify dataset behavior
Definition: vtkDataSet.h:172
Generic algorithm superclass for image algs.
topologically and geometrically regular array of data
Definition: vtkImageData.h:163
a simple class to control print indentation
Definition: vtkIndent.h:119
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:382
@ port
Definition: vtkX3D.h:453