From: tbaudier Date: Tue, 5 Mar 2019 09:46:40 +0000 (+0100) Subject: Into ImageArithm GUI in vv, add other operations X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?p=clitk.git;a=commitdiff_plain;h=73f0ab806cbb168db4d09908a714f8b7a662ee21 Into ImageArithm GUI in vv, add other operations Add Difference and relative difference between 2 images Add Divide, normalize and log for single image Rename, 2 buttons to adapt to real function (without V) --- diff --git a/vv/qt_ui/vvToolImageArithm.ui b/vv/qt_ui/vvToolImageArithm.ui index da3ff15..36a4641 100644 --- a/vv/qt_ui/vvToolImageArithm.ui +++ b/vv/qt_ui/vvToolImageArithm.ui @@ -114,6 +114,20 @@ + + + + Difference A-B + + + + + + + Relative difference (A-B)/A + + + @@ -207,14 +221,14 @@ - + Log A(x) (don't use v) - + Exp A(x) (don't use v) @@ -227,6 +241,27 @@ + + + + Division A(x)/v + + + + + + + A(x)/max(A(x)) (don't use v) + + + + + + + -Log (A(x)/v) + + + diff --git a/vv/vvToolImageArithm.cxx b/vv/vvToolImageArithm.cxx index 0f6221b..7b62110 100644 --- a/vv/vvToolImageArithm.cxx +++ b/vv/vvToolImageArithm.cxx @@ -103,6 +103,8 @@ void vvToolImageArithm::GetArgsInfoFromGUI() if (radioButtonMin->isChecked()) mArgsInfo.operation_arg = 4; if (radioButtonAbsDiff->isChecked()) mArgsInfo.operation_arg = 5; if (radioButtonSquaredDiff->isChecked()) mArgsInfo.operation_arg = 6; + if (radioButtonDifference->isChecked()) mArgsInfo.operation_arg = 7; + if (radioButtonRelativeDiff->isChecked()) mArgsInfo.operation_arg = 8; } else { mArgsInfo.input2_given = false; mArgsInfo.scalar_given = true; @@ -113,9 +115,12 @@ void vvToolImageArithm::GetArgsInfoFromGUI() if (radioButtonMinV->isChecked()) mArgsInfo.operation_arg = 4; if (radioButtonAbsDiffV->isChecked()) mArgsInfo.operation_arg = 5; if (radioButtonSquaredDiffV->isChecked()) mArgsInfo.operation_arg = 6; - if (radioButtonLogV->isChecked()) mArgsInfo.operation_arg = 7; - if (radioButtonExpV->isChecked()) mArgsInfo.operation_arg = 8; + if (radioButtonLogAlone->isChecked()) mArgsInfo.operation_arg = 7; + if (radioButtonExpAlone->isChecked()) mArgsInfo.operation_arg = 8; if (radioButtonSqrtV->isChecked()) mArgsInfo.operation_arg = 9; + if (radioButtonDivideV->isChecked()) mArgsInfo.operation_arg = 11; + if (radioButtonNormalize->isChecked()) mArgsInfo.operation_arg = 12; + if (radioButtonLogV->isChecked()) mArgsInfo.operation_arg = 13; mArgsInfo.scalar_given = true; mArgsInfo.scalar_arg = mValueSpinBox->value(); }