Advertisement
Guest User

Untitled

a guest
Mar 20th, 2015
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; Generate a list of colors to use. This list needs to be ordered so that
  2. ; channels consistently get the right color.
  3. ; Best understanding of input parameters: simple-channels are the channels
  4. ; from the MDA dialog, super-channels are simple-channels as augmented with
  5. ; "dashed" names when using multiple cameras (e.g. "Cy5-Camera2"),
  6. ; channel-names are the "name" fields from super-channels.
  7. (defn channel-colors [simple-channels super-channels channel-names channel-group]
  8.   (let [sorted-simple-names (sort (map #(:name %) simple-channels))
  9.         sorted-super-names (sort (map #(:name %) super-channels))
  10.         foo (prn "Simples" sorted-simple-names)
  11.         bar (prn "Supers" sorted-super-names)
  12.         s1 (prn "Block" (map #(. ChannelSettings getColorForChannel % channel-group (. Color WHITE)) sorted-super-names))]
  13.     (if (= (count simple-channels) (count super-channels)) ; i.e. not multicam
  14.       ; sort names; reach into super-channels for colors; return those.
  15.       (map #(.getRGB (:color (super-channels %)) sorted-super-names))
  16.       ; Ask ChannelSettings for color for this group/channel combination.
  17.       (map #(. ChannelSettings getColorForChannel % channel-group (. Color WHITE)) sorted-super-names))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement