Login  Register

Re: Selecting images without activating them

Posted by Dr Gareth Rees on Dec 16, 2006; 9:23am
URL: http://imagej.273.s1.nabble.com/Selecting-images-without-activating-them-tp3700808p3700812.html

This looks like a good suggestion too, but a bit daunting because it means
I have to learn Java first! (For me, the most natural and comfortable
progamming language is Fortran, which probably shows my age.) It'll be a
battle between inertia and frustration as usual - I'll teach myself Java
when I can't bear the delays implicit in not knowing it any more.

Thanks for the extra input

Gareth

On Dec 16 2006, Gabriel Landini wrote:

>On Friday 15 December 2006 20:07, Dr W.G. Rees wrote:
>> All I know how to do in ImageJ is SelectImage, which
>> activates the image. Using this, even a very modest macro that simply
>> switches between two open images and back again for each pixel in
>> turn, takes an impossibly long time (hours) to run,
>
> A further suggestion to the batch mode flag: There is obviously an
> overhead in switching to an image and accessing a pixel from it, so if
> you do this for every pixel, it becomes quite time consuming. What you
> can do instead is to read the entire images into arrays and then work
> from the arrays, so you access only the target image (to put the result)
> and save all the overhead processing of the switching. For this, plugins
> are better than macros. The macro language (unlike plugins) does not
> support 2D arrays, so one has to store the image as a 1D array. 1D arrays
> in plugins are also faster to process than 2D arrays.
>
>I hope it helps,
>
>Gabriel
>

--
Dr W Gareth Rees
Polar Landscape and Remote Sensing Group
Scott Polar Research Institute, University of Cambridge
T. (+44) 1223 336540/336575 F. (+44) 1223 336549