InsightSoftwareConsortium / InsightSoftwareConsortium/ITKSphinxExamples

Inconsistent Output Baseline Comparisons

未关闭
#212 1 条评论 1 个 reaction 已指派 1 人 已被 @mseng10 认领 在 GitHub 查看
主要语言
Jupyter Notebook
星标
59
派生
70
平均合并
1 天 15 小时
30 天内合并 PR
12

描述

## Description
After fixing a number of failing tests in the recent weeks, I came across some inconsistencies in the baseline test cases. Essentially, all of the baseline comparisons that compare an image without the name `OutputBaseline`, are incorrectly comparing results. An example can be found in the `AddNoiseToBinaryImageTestBaselineComparison`, which produces:
```
/Users/mseng_l/ITKExamples-build/bin/ImageCompareCommand "--test-image"
"/Users/mseng_l/ITKExamples-build/src/Core/Common/AddNoiseToBinaryImage/AddNoiseToBinaryImage.png" "--baseline-image"
"/Users/mseng_l/ITKExamples-build/src/Core/Common/AddNoiseToBinaryImage/AddNoiseToBinaryImage.png"
```
-------------

As shown above, the baseline comparison is not comparing the example's output to the baseline image, but rather the baseline image to itself, which will always yield a passing result.

This and many others will likely require one of the following changes:
- [ ] Remove baseline comparisons for examples that do not produce a consistent result (i.e. `AddNoiseToBinaryImage` due to `MersenneTwisterRandomVariateGenerator`)
- [ ] Rename baseline images to `OutputBaseline` for examples that consistently produce and save their output
- [ ] Implement `ImageFileWriter` for examples that do not save their output. Subsequently update the baseline comparison for that example, upload the image to `Girder` and finally update the `Documentation.rst`

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。