InsightSoftwareConsortium / InsightSoftwareConsortium/ITK

itkVersorRigid3DTransform::SetMatrix with tolerance parameter ignores parameter

Open
#3,336 0 comments 0 reactions 0 assignees View on GitHub
type:Bug
Dominant language
C++
Stars
1.7k
Forks
748
Avg merge
1d 1h
Merged PRs (30d)
64

Description

The `itkVersorRigid3DTransform::SetMatrix(const MatrixType &matrix, const TParametersValueType tolerance)` ignores the tolerance provided by the user (bug originally reported via SimpleITK/SimpleITK#1616). Code to reproduce below.

```
#include "itkVersorRigid3DTransform.h"

int
main(int, char *[])
{
using ValueType = double;
// tolerance is ignored if transform type is VersorRigid3DTransform but works when it is Rigid3DTransform
using TransformType = itk::VersorRigid3DTransform;
//using TransformType = itk::Rigid3DTransform;
using MatrixType = TransformType::MatrixType;
MatrixType matrix;

matrix[0][0]= 0.999088;
matrix[0][1] = -0.0276138;
matrix[0][2] = 0.0325613;
matrix[1][0] = 0.0289309;
matrix[1][1] = 0.998752;
matrix[1][2] = -0.0407008;
matrix[2][0] = -0.0313968;
matrix[2][1] = 0.0416058;
matrix[2][2] = 0.998641;

auto t = TransformType::New();
t->SetMatrix(matrix, 1e-5);
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.