Created
June 28, 2010 17:30
-
-
Save duncanmak/456132 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (ns edu.harvard.connectome.convert-tiff-to-png | |
| (:gen-class) | |
| (:import [edu.harvard.connectome Dataset IterationCallback] | |
| [ij IJ])) | |
| (defn only-tiff (proxy [java.io.FilenameFilter] [] | |
| (accept [file name] (.endsWith name "tif")))) | |
| (defn replace-extension [file old-ext new-ext] | |
| (.replace (str file) old-ext new-ext)) | |
| (defn convert-dataset [dataset section] | |
| (doseq [tiles (-> dataset (.get section))] | |
| (println tiles))) | |
| (def convert-callback | |
| (proxy [IterationCallback.Adapter] [] | |
| (invoke [dataset result section level r file] | |
| (convert-dataset dataset section)))) | |
| (defn convert-dataset [file] | |
| (let [dataset (Dataset/fromFile file)] | |
| (-> iterate convert-callback))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment