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