       rt (.getResultsTable tp)
       ;tmp (println (clojure.string/join "\t" (.getHeadings rt)))
       line (.getLine tp 0)
-      [image-name num-intersections] (clojure.string/split line #"\t") 
+      [image-name num-intersections] (clojure.string/split line #"\t")
       ;image-name (.getValue rt "Image name" 0)
       ;num-intersections (.getValue rt "Num of intersections" 0)
       ]

  (let [rt (ij.measure.ResultsTable/getResultsTable)]
    {:num-regions (.getCounter rt)
     :area (apply + (map #(.getValue rt "Area" %) (range (.getCounter rt))))}))
  
;(let [rm (ij.plugin.frame.RoiManager.)
;      num-rois (.getCount rm)]
  

(def new-mask (ij.WindowManager/getImage (str "Mask of " (str "C2-" orig-name ))))


;(println "saving as" (str (string/replace (string/replace orig-name ".tif" "") " " "_") "_labeled_branches.tif"))
;(ij.IJ/saveAsTiff imp (str directory "/" (string/replace orig-name ".tif" "") "_labeled_branches.tif"))

;(ij.IJ/run "Close All")
