 
 (def pixel-size (core getPixelSizeUm true))
 
-(defn image-sequence []
+(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
 

      (.rotate @angle)
      enable-anti-aliasing
      (paint-tiles @available-tiles (:zoom @screen-state))
      (.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)


;; tests

(defn set-rgb-luts []
  (swap! ss assoc :luts rgb))

(defn test-tile [nx ny]
  (add-to-available-tiles at 0 {:nx nx
                                :ny ny
                                :nz 0 
                                :nt 0
                                :nc 0}))

(defn test-tiles [nx ny]
  (.start (Thread.
