Index: /trunk/ippTools/src/dettool.c
===================================================================
--- /trunk/ippTools/src/dettool.c	(revision 12117)
+++ /trunk/ippTools/src/dettool.c	(revision 12118)
@@ -1447,4 +1447,13 @@
     if (!isnan(posang_max)) {
         detRun->posang_max = posang_max;
+    }
+
+    psString label = psMetadataLookupStr(&status, config->args, "-set_label");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -set_label");
+        return false;
+    }
+    if (label) {
+        detRun->label = label;
     }
 
Index: /trunk/ippTools/src/dettoolConfig.c
===================================================================
--- /trunk/ippTools/src/dettoolConfig.c	(revision 12117)
+++ /trunk/ippTools/src/dettoolConfig.c	(revision 12118)
@@ -185,4 +185,6 @@
     psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-pretend",  0,
             "print the exposures that would be included in the detrend run and exit", false);
+    psMetadataAddStr(definebyqueryArgs, PS_LIST_TAIL, "-label",  0,
+            "define detrun label", NULL);
     psMetadataAddBool(definebyqueryArgs, PS_LIST_TAIL, "-simple",  0,
             "use the simple output format", false);
@@ -232,4 +234,6 @@
     psMetadataAddStr(definebydetrunArgs, PS_LIST_TAIL, "-filter_input_end", 0,
             "filter input detrun exp to be in this peroid", NULL);
+    psMetadataAddStr(definebydetrunArgs, PS_LIST_TAIL, "-set_label",  0,
+            "define detrun label", NULL);
     psMetadataAddBool(definebydetrunArgs, PS_LIST_TAIL, "-simple", 0,
             "use the simple output format", false);
