Import 2017-06-07 23:51:09: master d65f2de9

Author Committer Branch Timestamp Parent
jcfr jcfr master 2015-10-29 00:15:41 master 482471ad
Changeset

BUG: Fix DiffusionWeightedVolumeMasking module and add test. See 0003855

The updated line calculates the magnitude of each gradient, and
determines that an image is "baseline" if the magnitude is smaller than
a threshold.

The use of "abs()" on double values caused the magnitude to
always be 0, and therefore all images were considered as "baseline" and
included in the average computed by the filter and presented as "Output
baseline volume" to the user.

This commit fixes the incorrect logic using "fabs()", simplifies the test
case removing the use of "--removeislands", updates the test harness to use
"compare" functions to validate the output of the module against baseline
images.

Note that the "--removeislands" should be tested in a separate test case.

Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>

From: Orjan Bergmann <orjan.bergmann@gmail.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24673 3bd1e089-480b-0410-8dfb-8563597acbee

add - Modules/CLI/DiffusionWeightedVolumeMasking/Data/Baseline/DiffusionWeightedVolumeMaskingTest_EstimatedBaseline.nhdr Diff File
add - Modules/CLI/DiffusionWeightedVolumeMasking/Data/Baseline/DiffusionWeightedVolumeMaskingTest_EstimatedBaseline.raw.gz Diff File
add - Modules/CLI/DiffusionWeightedVolumeMasking/Data/Baseline/DiffusionWeightedVolumeMaskingTest_OtsuThresholdMask.nhdr Diff File
add - Modules/CLI/DiffusionWeightedVolumeMasking/Data/Baseline/DiffusionWeightedVolumeMaskingTest_OtsuThresholdMask.raw.gz Diff File
mod - Modules/CLI/DiffusionWeightedVolumeMasking/DiffusionWeightedVolumeMasking.cxx Diff File
mod - Modules/CLI/DiffusionWeightedVolumeMasking/Testing/CMakeLists.txt Diff File
mod - Modules/CLI/DiffusionWeightedVolumeMasking/Testing/DiffusionWeightedVolumeMaskingTest.cxx Diff File