Modules
PointSet
src
FuzzyCorrespondenceUtils.h
1
/*
2
* Medical Image Registration ToolKit (MIRTK)
3
*
4
* Copyright 2013-2015 Imperial College London
5
* Copyright 2013-2015 Andreas Schuh
6
*
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
* you may not use this file except in compliance with the License.
9
* You may obtain a copy of the License at
10
*
11
* http://www.apache.org/licenses/LICENSE-2.0
12
*
13
* Unless required by applicable law or agreed to in writing, software
14
* distributed under the License is distributed on an "AS IS" BASIS,
15
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
* See the License for the specific language governing permissions and
17
* limitations under the License.
18
*/
19
20
#include "mirtk/FuzzyCorrespondence.h"
21
22
23
namespace
mirtk
{
namespace
FuzzyCorrespondenceUtils {
24
25
26
/// Type of fuzzy correspondences weight matrix
27
typedef
FuzzyCorrespondence::WeightMatrix
WeightMatrix;
28
29
/// Sinkhorn-Knopp algorithm for column and row normalization
30
///
31
/// \param[in,out] weight Fuzzy correspondence weight matrix.
32
/// \param[in] m Number of columns to normalize.
33
/// \param[in] n Number of rows to normalize.
34
/// \param[in] maxit Maximum number of iterations.
35
/// \param[in] maxerr Maximum squared error. If non-positive, the maximum
36
/// number of iterations is performed. This may be
37
/// considerably faster than always checking the error.
38
void
NormalizeWeights(WeightMatrix &weight,
int
m = -1,
int
n = -1,
39
int
maxit = 10,
double
maxerr = .0);
40
41
42
} }
// namespace mirtk::FuzzyCorrespondenceUtils
mirtk
Definition:
IOConfig.h:41
mirtk::FuzzyCorrespondence::WeightMatrix
GenericSparseMatrix< float > WeightMatrix
Sparse matrix type used for fuzzy correspondence weights.
Definition:
FuzzyCorrespondence.h:58