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 =========================================================================*/
42 #ifndef vtkPointOccupancyFilter_h
43 #define vtkPointOccupancyFilter_h
44 
45 #include "vtkFiltersPointsModule.h" // For export macro
46 #include "vtkImageAlgorithm.h"
47 
48 class VTKFILTERSPOINTS_EXPORT vtkPointOccupancyFilter : public vtkImageAlgorithm
49 {
50 public:
52 
56  static vtkPointOccupancyFilter *New();
58  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
60 
62 
66  void SetSampleDimensions(int i, int j, int k);
67  void SetSampleDimensions(int dim[3]);
68  vtkGetVectorMacro(SampleDimensions,int,3);
70 
72 
78  vtkSetVector6Macro(ModelBounds,double);
79  vtkGetVectorMacro(ModelBounds,double,6);
81 
83 
88  vtkSetMacro(EmptyValue,unsigned char);
89  vtkGetMacro(EmptyValue,unsigned char);
90  vtkSetMacro(OccupiedValue,unsigned char);
91  vtkGetMacro(OccupiedValue,unsigned char);
93 
94 protected:
97 
98  int SampleDimensions[3]; // dimensions of volume over which to compute occupancy
99  double ModelBounds[6]; // bounding box defining image
100  double Origin[3], Spacing[3]; // output geometry
101  unsigned char EmptyValue; // what value indicates a voxel is empty
102  unsigned char OccupiedValue; // what value indicates a voxel is occupied
103 
104  int FillInputPortInformation(int port, vtkInformation* info) VTK_OVERRIDE;
107  vtkInformationVector *) VTK_OVERRIDE;
110  vtkInformationVector *) VTK_OVERRIDE;
111 
112  void ComputeModelBounds(vtkDataSet *input, vtkImageData *output,
113  vtkInformation *outInfo);
114 
115 private:
116  vtkPointOccupancyFilter(const vtkPointOccupancyFilter&) VTK_DELETE_FUNCTION;
117  void operator=(const vtkPointOccupancyFilter&) VTK_DELETE_FUNCTION;
118 };
119 
120 #endif
Store vtkAlgorithm input/output information.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:56
produce occupancy bit mask from input point cloud
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.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...
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
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.