]> Creatis software - clitk.git/commitdiff
Into ImageArithm GUI in vv, add other operations
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Tue, 5 Mar 2019 09:46:40 +0000 (10:46 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Tue, 5 Mar 2019 09:46:40 +0000 (10:46 +0100)
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)

vv/qt_ui/vvToolImageArithm.ui
vv/vvToolImageArithm.cxx

index da3ff15bdb6338b619a6d0c52e09c50b67fa59c5..36a4641ebda8a1f7a4312a71ebbcb8e8907a1d0a 100644 (file)
           </property>
          </widget>
         </item>
+        <item>
+         <widget class="QRadioButton" name="radioButtonDifference">
+          <property name="text">
+           <string>Difference A-B</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QRadioButton" name="radioButtonRelativeDiff">
+          <property name="text">
+           <string>Relative difference (A-B)/A</string>
+          </property>
+         </widget>
+        </item>
        </layout>
       </widget>
      </item>
          </widget>
         </item>
         <item>
-         <widget class="QRadioButton" name="radioButtonLogV">
+         <widget class="QRadioButton" name="radioButtonLogAlone">
           <property name="text">
            <string>Log A(x)    (don't use v)</string>
           </property>
          </widget>
         </item>
         <item>
-         <widget class="QRadioButton" name="radioButtonExpV">
+         <widget class="QRadioButton" name="radioButtonExpAlone">
           <property name="text">
            <string>Exp A(x)    (don't use v)</string>
           </property>
           </property>
          </widget>
         </item>
+        <item>
+         <widget class="QRadioButton" name="radioButtonDivideV">
+          <property name="text">
+           <string>Division A(x)/v</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QRadioButton" name="radioButtonNormalize">
+          <property name="text">
+           <string>A(x)/max(A(x))    (don't use v)</string>
+          </property>
+         </widget>
+        </item>
+        <item>
+         <widget class="QRadioButton" name="radioButtonLogV">
+          <property name="text">
+           <string>-Log (A(x)/v)</string>
+          </property>
+         </widget>
+        </item>
        </layout>
       </widget>
      </item>
index 0f6221bb9623d07b4c9598c73b1c0b952d4e0736..7b62110d275ac4ab234b4baa36088653c6e10756 100644 (file)
@@ -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();
   }