ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
vtkBoundedVolumeSource.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include "qPCL.h" // needed for export macro
11 #include "vtkImageAlgorithm.h"
12 #include "vtkVector.h" // for vtkVector
13 
14 class vtkBoundingBox;
15 
16 class QPCL_ENGINE_LIB_API vtkBoundedVolumeSource : public vtkImageAlgorithm {
17 public:
19  vtkTypeMacro(vtkBoundedVolumeSource, vtkImageAlgorithm);
20  void PrintSelf(ostream& os, vtkIndent indent) override;
21 
23 
26  vtkSetVector3Macro(Origin, double);
27  vtkGetVector3Macro(Origin, double);
29 
31 
35  vtkSetVector3Macro(Scale, double);
36  vtkGetVector3Macro(Scale, double);
38 
39  enum RefinementModes { USE_RESOLUTION, USE_CELL_SIZE };
40 
44  vtkSetClampMacro(RefinementMode, int, USE_RESOLUTION, USE_CELL_SIZE);
45  vtkGetMacro(RefinementMode, int);
46 
48 
52  vtkSetVector3Macro(Resolution, int);
53  vtkGetVector3Macro(Resolution, int);
55 
57 
64 
66 
70  vtkSetClampMacro(Padding, double, 0, VTK_DOUBLE_MAX);
71  vtkGetMacro(Padding, double);
73 
75 
80  static bool SetImageParameters(vtkImageData* image,
81  const vtkBoundingBox& bbox,
82  const vtkVector3i& resolution);
83  static bool SetImageParameters(vtkImageData* image,
84  const vtkBoundingBox& bbox,
85  const double cellSize);
87 
88 protected:
90  ~vtkBoundedVolumeSource() override;
91 
92  int RequestInformation(vtkInformation* request,
93  vtkInformationVector** inputVector,
94  vtkInformationVector* outputVector) override;
95  void ExecuteDataWithInformation(vtkDataObject* data,
96  vtkInformation* outInfo) override;
97 
98  double Origin[3];
99  double Scale[3];
101  int Resolution[3];
102  double CellSize;
103  double Padding;
104 
105 private:
107  void operator=(const vtkBoundedVolumeSource&) = delete;
108 };
std::shared_ptr< core::Tensor > image
vtkIdType CellSize
Definition: VtkUtils.cpp:217
vtkGetMacro(RefinementMode, int)
vtkSetClampMacro(RefinementMode, int, USE_RESOLUTION, USE_CELL_SIZE)
vtkSetVector3Macro(Origin, double)
vtkSetClampMacro(Padding, double, 0, VTK_DOUBLE_MAX)
vtkSetMacro(CellSize, double)
vtkGetVector3Macro(Origin, double)
vtkTypeMacro(vtkBoundedVolumeSource, vtkImageAlgorithm)
vtkGetVector3Macro(Scale, double)
vtkGetMacro(CellSize, double)
vtkSetVector3Macro(Resolution, int)
vtkGetVector3Macro(Resolution, int)
vtkSetVector3Macro(Scale, double)
vtkGetMacro(Padding, double)
static vtkBoundedVolumeSource * New()
GraphType data
Definition: graph_cut.cc:138
#define QPCL_ENGINE_LIB_API
Definition: qPCL.h:15