 
 (defn collect [event out-queue]
   (condp = (:task event)
-                :snap (collect-snapped-images event out-queue)
+                :snap (collect-snap-image event out-queue)
                 :burst (collect-burst-images event out-queue)))
 
 (defn z-in-msp [msp z-drive]

   :pixel-type (get-pixel-type)
   :binning (core getProperty (core getCameraDevice) "Binning")})

(defn acquire-tagged-images []
  (binding [state (atom (create-basic-state))]
    (let [event (create-basic-event)]
      (core snapImage)
      (collect-snapped-images event nil))))
    
(defn show-image [display tagged-images focus]
  (let [cache (.getImageCache display)]
    (doseq [tagged-image tagged-images]
      (println tagged-image)
      (.putImage cache tagged-image)
      (.showImage display tagged-image)
      (when focus
        (.show display)))))

(defn add-to-album []
  (doseq [image (acquire-tagged-images)]
    (.addToAlbum gui image)))

(defn reset-snap-window [tagged-images]
  (when-not (and @snap-window
                   ;(compatible-image? @snap-window tagged-image)
                   (not (.windowClosed @snap-window)))
    (when @snap-window (.close @snap-window))
    (reset! snap-window (create-image-window tagged-images))))

(defn do-snap []
  (println "do-snap")
  (let [tagged-images (acquire-tagged-images)]
    (reset-snap-window tagged-images)
    (show-image @snap-window tagged-images true)))

;; live mode


    image-tags
    ["Width" "Height" "PixelType"]))  

(defn create-image-window [first-image]
  (let [summary {:interval-ms 0.0, :custom-intervals-ms [] :use-autofocus false, :autofocus-skip 0,
                 :relative-slices true, :keep-shutter-open-slices false, :comment "",
                 :prefix "Untitled", :root "",
                 :time-first false, :positions (), :channels (), :slices-first true,
                 :slices nil, :numFrames 0, :keep-shutter-open-channels false,
                 :zReference 0.0, :frames (), :save false}
		summary-metadata (make-summary-metadata summary)
