   [process-function]
   (proxy [DataProcessor] []
     (process []
-             (let [img (.poll this)]
-               (if (.tags img)
-                 (let [result (process-function img)]
-                   (if (counted? result)
-                     (doseq [image result]
-                       (.produce this image))
-                     (.produce this result)))
-                 (.produce this img))))))
+             (let [img (.poll this)
+                   result (if (.tags img) (process-function img) img)]
+               (produce-results this result)))))
                    
-
 ;A list of image processors that have been attached to
 ;the acquisition engine.
 (defonce image-processors (atom #{}))

        (let [tags (json-clone (.tags img))]
          (update-tag! tags "ChannelIndex" #(+ 2 %))            
          (update-tag! tags "Channel" #(str % "-2"))
          [img (TaggedImage. (.pix img) tags)]))))

(defn restart-test []
  (remove-all-image-processors!)

  (when (.tags image)
    (edt (println prefix (.get (.tags image) "Channel")))))

(defn produce-results [data-processor results]
  (if (counted? results)
    (doseq [result results]
      (.produce data-processor result))
    (.produce data-processor results)))
      
(defn simple-data-processor
  "Make a DataProcessor whose process method is implemented by
   process-function, which should accept a single image and return
