VTK
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 =========================================================================*/
45 #ifndef vtkPointOccupancyFilter_h
46 #define vtkPointOccupancyFilter_h
47 
48 #include "vtkFiltersPointsModule.h" // For export macro
49 #include "vtkImageAlgorithm.h"
50 
51 class VTKFILTERSPOINTS_EXPORT vtkPointOccupancyFilter : public vtkImageAlgorithm
52 {
53 public:
55 
59  static vtkPointOccupancyFilter *New();
61  void PrintSelf(ostream& os, vtkIndent indent) override;
63 
65 
69  void SetSampleDimensions(int i, int j, int k);
70  void SetSampleDimensions(int dim[3]);
71  vtkGetVectorMacro(SampleDimensions,int,3);
73 
75 
81  vtkSetVector6Macro(ModelBounds,double);
82  vtkGetVectorMacro(ModelBounds,double,6);
84 
86 
91  vtkSetMacro(EmptyValue,unsigned char);
92  vtkGetMacro(EmptyValue,unsigned char);
93  vtkSetMacro(OccupiedValue,unsigned char);
94  vtkGetMacro(OccupiedValue,unsigned char);
96 
97 protected:
99  ~vtkPointOccupancyFilter() override;
100 
101  int SampleDimensions[3]; // dimensions of volume over which to compute occupancy
102  double ModelBounds[6]; // bounding box defining image
103  double Origin[3], Spacing[3]; // output geometry
104  unsigned char EmptyValue; // what value indicates a voxel is empty
105  unsigned char OccupiedValue; // what value indicates a voxel is occupied
106 
107  int FillInputPortInformation(int port, vtkInformation* info) override;
110  vtkInformationVector *) override;
113  vtkInformationVector *) override;
114 
115  void ComputeModelBounds(vtkDataSet *input, vtkImageData *output,
116  vtkInformation *outInfo);
117 
118 private:
120  void operator=(const vtkPointOccupancyFilter&) = delete;
121 };
122 
123 #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.
vtkPointOccupancyFilter::OccupiedValue
unsigned char OccupiedValue
Definition: vtkPointOccupancyFilter.h:105
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkPointOccupancyFilter::EmptyValue
unsigned char EmptyValue
Definition: vtkPointOccupancyFilter.h:104
vtkImageAlgorithm.h
vtkImageAlgorithm
Generic algorithm superclass for image algs.
Definition: vtkImageAlgorithm.h:40
vtkX3D::port
Definition: vtkX3D.h:447
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...
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkPointOccupancyFilter
produce occupancy bit mask from input point cloud
Definition: vtkPointOccupancyFilter.h:51
vtkDataSet
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkX3D::info
Definition: vtkX3D.h:376
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()
vtkImageAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.