VTK-m  2.0
ComputeMoments.h
Go to the documentation of this file.
1 //============================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //=======================================================================
10 #ifndef vtk_m_filter_image_processing_ComputeMoments_h
11 #define vtk_m_filter_image_processing_ComputeMoments_h
12 
14 #include <vtkm/filter/image_processing/vtkm_filter_image_processing_export.h>
15 
16 namespace vtkm
17 {
18 namespace filter
19 {
20 namespace image_processing
21 {
22 class VTKM_FILTER_IMAGE_PROCESSING_EXPORT ComputeMoments : public vtkm::filter::FilterField
23 {
24 public:
26 
27  VTKM_CONT void SetRadius(double _radius) { this->Radius = _radius; }
28 
29  VTKM_CONT void SetSpacing(vtkm::Vec3f _spacing) { this->Spacing = _spacing; }
30 
31  VTKM_CONT void SetOrder(vtkm::Int32 _order) { this->Order = _order; }
32 
33 private:
34  VTKM_CONT vtkm::cont::DataSet DoExecute(const vtkm::cont::DataSet& input) override;
35 
36  double Radius = 1;
37  vtkm::Vec3f Spacing = { 1.0f, 1.0f, 1.0f };
38  vtkm::Int32 Order = 0;
39 };
40 } // namespace image_processing
41 } // namespace filter
42 } // namespace vtkm
43 
44 #endif //vtk_m_filter_image_processing_ComputeMoments_h
vtkm::filter::image_processing::ComputeMoments::SetOrder
VTKM_CONT void SetOrder(vtkm::Int32 _order)
Definition: ComputeMoments.h:31
vtkm::filter::image_processing::ComputeMoments::SetSpacing
VTKM_CONT void SetSpacing(vtkm::Vec3f _spacing)
Definition: ComputeMoments.h:29
vtkm
Groups connected points that have the same field value.
Definition: Atomic.h:19
vtkm::filter::image_processing::ComputeMoments
Definition: ComputeMoments.h:22
vtkm::cont::DataSet
Definition: DataSet.h:34
vtkm::filter::image_processing::ComputeMoments::SetRadius
VTKM_CONT void SetRadius(double _radius)
Definition: ComputeMoments.h:27
FilterField.h
vtkm::filter::FilterField
Definition: FilterField.h:21
VTKM_CONT
#define VTKM_CONT
Definition: ExportMacros.h:57
vtkm::Vec< vtkm::FloatDefault, 3 >
vtkm::Int32
int32_t Int32
Definition: Types.h:160