       (.rotate @angle)
       enable-anti-aliasing
       (paint-tiles @available-tiles (:zoom @screen-state))
+      (.setColor Color/YELLOW)
+      (.fillOval -30 -30
+                 60 60)
       (.setTransform original-transform)
-      (.setColor (Color. 0x00A08F))
-      (.fillOval (- (+ (/ (:width @screen-state) 2)
-                       (:x @screen-state))
-                    30)
-                 (- (+ (/ (:height @screen-state) 2)
-                       (:y @screen-state))
-                    30)
-                 60 60)
       (.setColor Color/YELLOW)
       (.drawString (str @screen-state)
                    (int 0)

                           RenderingHints/VALUE_ANTIALIAS_OFF)))))
       
(defn paint-tiles [^Graphics2D g available-tiles zoom]
  (doseq [[[nx ny nz nt nc] image] (get available-tiles zoom)]
    (let [[x y] (tile-to-pixels [nx ny] [512 512] zoom)]
      (when image
        (.drawImage g image


(def pixel-size (core getPixelSizeUm true))

(defn tagged-image-sequence []
  (let [q (.runSilent (AcqEngine.))]
    (take-while #(not= % TaggedImageQueue/POISON)
                (repeatedly #(.take q)))))

(def rgb (vec (map #(lut-object % 0 50 1.0) [Color/RED Color/GREEN Color/BLUE])))

(defn tagged-image-to-processor [tagged-image]
  {:proc (ImageUtils/makeProcessor tagged-image)
   :tags (json-to-data (.tags tagged-image))})

(defn processor-sequence []
  (map tagged-image-to-processor (tagged-image-sequence)))

(defn get-channel-index [raw]
  (-> raw :tags (get "ChannelIndex")))

(defn get-frame-index [raw]
  (-> raw :tags (get "FrameIndex")))

(defn get-slice-index [raw]
  (-> raw :tags (get "SliceIndex")))

;(defn add-images-here [images [x y]]
;  (doseq [image images]
;     (assoc-in [0 [(get-channel-index 

  

;; image properties

