     (RandomAccessInputStream. filename)
     comment))
 
-(defn overwrite-tiff-xml [filename xml]
-  (overwrite-comment filename (xml-to-str xml)))
+(defn overwrite-tiff-metadata [filename md]
+  (overwrite-comment filename (generate-xml md)))
 
 ;; construct OME metadata using clojure xml emitter
 


(def test-meta (populate-meta 0 (new-ome-meta) 512 512 2 2 2 2))

(defn test-write-image []
  (write-ome-tiff
    "blah.tiff"
    (rand-image 512 512 2 2)
    test-meta))


(defn get-ome-xml-string [m]
  (.getOMEXML ome-xml-service m))
                    
(defn parse-ome-metadata [m]
  (-> m get-ome-xml-string parse-xml))

;; read/write tiff files

