MeshLib C++ Docs
Loading...
Searching...
No Matches
MRCudaPointsToDistanceVolume.h
Go to the documentation of this file.
1#pragma once
2
3#include "config.h"
4#ifndef MRCUDA_NO_VOXELS
5#include "exports.h"
8
9namespace MR
10{
13
14
15namespace Cuda
16{
19
23 std::function<Expected<void> ( const SimpleVolumeMinMax& volume, int zOffset )> addPart, int layerOverlap );
24
26MRCUDA_API size_t pointsToDistanceVolumeMemory( const PointCloud& cloud, const Vector3i& dims, const VertNormals* ptNormals );
27
30{
31public:
35 MRCUDA_API bool canCompute( const PointCloud& cloud, const MR::PointsToDistanceVolumeParams& params ) const override;
36 MRCUDA_API Expected<MR::SimpleVolumeMinMax> compute( const PointCloud& cloud, const MR::PointsToDistanceVolumeParams& params ) const override;
38 AddPartFunc addPart, int layerOverlap ) const override;
39};
40
41}
42}
43#endif
CUDA implementation of IComputePointsToDistanceVolumeByParts.
Definition MRCudaPointsToDistanceVolume.h:30
complements IComputePointsToDistanceVolume with computation in z-slabs, which needs less memory
Definition MRPointsToDistanceVolume.h:68
double volume(const MeshTopology &topology, const VertCoords &points, const FaceBitSet *region=nullptr)
bool canCompute(const PointCloud &cloud, const MR::PointsToDistanceVolumeParams &params) const override
std::function< Expected< void >(const SimpleVolumeMinMax &volume, int zOffset)> AddPartFunc
gets one z-slab of the volume, starting at z-layer zOffset
Definition MRPointsToDistanceVolume.h:71
tl::expected< T, E > Expected
Definition MRExpected.h:31
size_t pointsToDistanceVolumeMemory(const PointCloud &cloud, const Vector3i &dims, const VertNormals *ptNormals)
returns the minimal amount of free GPU memory required to build a distance volume with given dimensio...
Expected< MR::SimpleVolumeMinMax > compute(const PointCloud &cloud, const MR::PointsToDistanceVolumeParams &params) const override
Expected< void > pointsToDistanceVolumeByParts(const PointCloud &cloud, const MR::PointsToDistanceVolumeParams &params, std::function< Expected< void >(const SimpleVolumeMinMax &volume, int zOffset)> addPart, int layerOverlap)
Expected< MR::SimpleVolumeMinMax > pointsToDistanceVolume(const PointCloud &cloud, const MR::PointsToDistanceVolumeParams &params)
makes SimpleVolume filled with signed distances to points with normals
SimpleVolumeMinMax
Definition MRVoxelsFwd.h:35
Expected< void > computeByParts(const PointCloud &cloud, const MR::PointsToDistanceVolumeParams &params, AddPartFunc addPart, int layerOverlap) const override
makes the volume by z-slabs, passing each of them in addPart with layerOverlap layers shared by neigh...
Definition MRCudaBasic.h:15
Only strictly necessary for the bindings (to make MR::MeshIntersectionResult a complete type).
Definition MRCameraOrientationPlugin.h:8
Definition MRPointCloud.h:17
Definition MRPointsToDistanceVolume.h:18