 ;; metadata
 
 (defn annotate-image [img event state]
-  (TaggedImage. img (JSONObject.
-    (merge
+  {:pix img
+   :tags (merge
       (map-config (core getSystemStateCache))
       {
        "AxisPositions" (when-let [axes (get-in event [:position :axes])] (JSONObject. axes))

                :snap (collect-snap-image)
                :init-burst (collect-burst-image)
                :collect-burst (collect-burst-image))]
    (.put out-queue (annotate-image image event @state))))

(defn compute-z-position [event]
  (if-let [z-drive (:z-drive event)]

       "UUID" (UUID/randomUUID)
       "Width"  (state :init-width)
       "ZPositionUm" (state :last-z-position)
      })})

(defn make-TaggedImage [annotated-img]
  (TaggedImage. (:pix annotated-img) (JSONObject. (:tags annotated-img))))

;; acq-engine

