How can I do batch processing of images using ImageJ in Java or clojure?

I want to use ImageJ to process several thousand images.

Is there a way to make any generic imageJ plugin and apply it to hundreds of images automatically?

For example, let's say I want to take a thousand images and apply polar conversion to each ---

The polar conversion plugin for ImageJ can be found here:

http://rsbweb.nih.gov/ij/plugins/polar-transformer.html

Fine! Let me use it. From:

http://albert.rierol.net/imagej_programming_tutorials.html#How%20to%20automate%20an%20ImageJ%20dialog

I find that I can apply the plugin using the following:

(defn x-polar 
  [imageP]
  (let [thread (Thread/currentThread)
        options ""]
    (.setName thread "Run$_polar-transform")
    (Macro/setOptions thread options)
    (IJ/runPlugIn imageP "Polar_Transformer" "")))

, , . , , .

, , - , .

, , :

(defn x-polar 
  [imageP]
  (let [thread (Thread/currentThread)
        options ""]
    (.setName thread "Run$_polar-transform")
    (Macro/setOptions thread options)
    (IJ/runPlugIn imageP "Polar_Transformer" "")
    (let [return-image (IJ/getImage)]
      (.hide return-image)
      return-image)))

- , imageJ . - ?

, --

+3
1

, ImageJ , . ( , :)) , Polar_Transformer.java :

http://gist.github.com/452826

... , Fiji, . PlugIn exec(...) , . ( , .)

, - , - , , , , , - .

+4

Source: https://habr.com/ru/post/1743670/


All Articles