     (.setPixelsType PixelType/UINT8 0)
     (.setChannelID "Channel:0:0" 0 0)
     (.setChannelSamplesPerPixel (+int ncomponents) 0 0)))
+
+;; read/write tiff files
 
 (defn write-ome-tiff [filename pixels metadata]
   (doto (ImageWriter.)


(defn rand-image [w h nchannels bytes-per-pixel]
  (rand-bytes (* w h nchannels )))

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



;; testing

;;;; image generation

(defn rand-byte []
  (byte (- (rand-int 256) 128)))

