Login  Register

Re: Batch Z Projection

Posted by Mario Emmenlauer-3 on Jul 23, 2008; 9:46am
URL: http://imagej.273.s1.nabble.com/Batch-Z-Projection-tp3686091p3686096.html

Hi Michael,

it seems this might have been the problem, after upgrading to latest ImageJ
I don't see this error any more.

But the basic problem remains, I don't know which stacks my macro opened.
Is there a way for a plugin or macro to know which windows it opened? I use
the ome loci plugin to load datasets with multiple timepoints, and have the
'split' option activated, so I get T (invisible) datasets.

It seems like bad programming to just call
   process()
   close()

T times, and assume it will be the correct windows. What would happen if the
user activates another window in the meantime? Would I not process and close
the wrong one?
I could of course make assumptions on the opened datasets names, but that
seems like even more error-prone?

Cheers,

    Mario


Michael Schmid wrote:

> Hi Mario,
>
> concerning "z projection", I have never experienced the
> problem of the result not being the foreground window.
>
> Maybe you are using an old version of ImageJ? There was a race
> condition problem in ImageJ versions prior to 1.39f (it seems
> that this bugfix is not mentioned in the release notes).
> This might have caused the problem that you describe.
>
> Michael
> ________________________________________________________________
>
> On 22 Jul 2008, at 08:42, Mario Emmenlauer wrote:
>
>> Hi,
>>
>> I wrote a Macro that batch Z projects a directory tree. There is one
>> thing that gives me a headache:
>> When I make a Z-projection, it results in a newly created image,
>> which is not *always* the active (selected) one. Subsequent calls
>> to save() sometimes save the MIP, sometimes the stack.
>>
>> I would select the Image by string, but how do I know the user
>> has not just opened another image with the same title? Is there
>>  1) a way to be sure to select the image that was the result of the
>>     last operation, or
>>  2) a way to tell Z-project the name it should give to the resulting
>>     window, so I can generate my own string Id?
>>
>> If there is a well-known way, please add it to the macros tutorial.
>>
>> Thanks in advance, and keep up the good work,
>>
>>    Mario Emmenlauer
>>
>>
>> // "BatchProcessFolders"
> (...)
>