ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
ChamferDistanceTransform.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
// Local
11
#include "
Grid3D.h
"
12
#include "
MathTools.h
"
13
14
namespace
cloudViewer
{
15
16
class
GenericProgressCallback;
17
class
NormalizedProgress;
18
20
24
class
CV_CORE_LIB_API
ChamferDistanceTransform
:
public
Grid3D
<unsigned short>,
25
public
MathTools
{
26
public
:
28
30
static
const
unsigned
short
MAX_DIST = 0xFAFA;
31
33
37
inline
bool
init
(
const
Tuple3ui
& gridSize) {
38
return
Grid3D<GridElement>::init
(gridSize.
x
, gridSize.
y
, gridSize.
z
, 1,
39
MAX_DIST);
40
}
41
43
51
int
propagateDistance(
CHAMFER_DISTANCE_TYPE
type
,
52
GenericProgressCallback
* progressCb =
nullptr
);
53
};
54
55
}
// namespace cloudViewer
CHAMFER_DISTANCE_TYPE
CHAMFER_DISTANCE_TYPE
Chamfer distances types.
Definition:
CVConst.h:114
CV_CORE_LIB_API
#define CV_CORE_LIB_API
Definition:
CVCoreLibWin.h:15
type
char type
Definition:
FileIOFactory.cpp:131
Grid3D.h
MathTools.h
Tuple3Tpl< unsigned int >
Tuple3Tpl::y
Type y
Definition:
CVGeom.h:137
Tuple3Tpl::x
Type x
Definition:
CVGeom.h:137
Tuple3Tpl::z
Type z
Definition:
CVGeom.h:137
cloudViewer::ChamferDistanceTransform
Class to compute a Chamfer distance field on a 3D grid.
Definition:
ChamferDistanceTransform.h:25
cloudViewer::ChamferDistanceTransform::init
bool init(const Tuple3ui &gridSize)
Initializes the grid.
Definition:
ChamferDistanceTransform.h:37
cloudViewer::GenericProgressCallback
Definition:
GenericProgressCallback.h:20
cloudViewer::Grid3D
Simple 3D grid structure.
Definition:
Grid3D.h:32
cloudViewer::Grid3D::init
bool init(unsigned di, unsigned dj, unsigned dk, unsigned margin, GridElement defaultCellValue=0)
Initializes the grid.
Definition:
Grid3D.h:77
cloudViewer::MathTools
Empty class - for classification purpose only.
Definition:
MathTools.h:15
cloudViewer
Generic file read and write utility for python interface.
Definition:
AutoSegmentationTools.h:16
core
include
ChamferDistanceTransform.h
Generated on Wed Jan 28 2026 09:00:53 for ACloudViewer by
1.9.1