NOTICE! This is a static HTML version of a legacy LOCI Software ticket.

LOCI projects are now located on GitHub. The Bio-Formats project can be found here.

Ticket #57 (closed enhancement: fixed)

Opened 2007-03-20T09:50:31-05:00

Last modified 2008-08-15T14:06:16-05:00

Execute ImageJ macros on virtual stacks

Reported by: curtis Owned by: melissa
Priority: minor Milestone:
Component: plugins Severity: major
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by curtis)

Currently, when working with an ImageJ virtual stack, performing any command that alters image planes (e.g., Process>Smooth) affects only the currently displayed image plane. As long as that plane remains in the cache, it will remain altered, but as soon as the plane is dropped from memory (e.g., if the user navigates to a new plane too far away from the original plane), the action is lost, since the plane is recached from disk.

One solution to this issue is to take advantage of ImageJ's comprehensive macro language functionality, recording each command into a "preprocessing macro" that is dynamically applied to planes as the commands occur, and as new planes are cached. To the user, the behavior would seem nearly identical to a normal image window, except for potential delays from CPU-intensive image processing operations.

At one point the codebase contained an initial implementation of this idea, but it was not yet robust. The macro recorder window sometimes popped up unexpectedly, so the preprocessing macro logic has been commented out for now (r2463).

This type of functionality would be useful for ImageJ in general, not just as part of the LOCI plugins, and as such a comprehensive implementation would make the most sense, rather than merely within the context of the LOCI plugins.

Change History

comment:1 Changed 2007-10-11T12:57:51-05:00 by melissa

  • Priority changed from minor to major

comment:2 Changed 2008-07-02T14:49:09-05:00 by curtis

  • Priority changed from major to minor
  • Component changed from browser to plugins
  • Description modified
  • Severity set to major

comment:3 Changed 2008-08-15T14:06:16-05:00 by melissa

  • Status changed from new to closed
  • Resolution set to fixed

This feature is mostly functional in r4311. Needs a bit more work to get it working with the data browser, and will need to be tested more with more complex macros.

Rather than working with the macro recorder, there is a new class called "RecordedImageProcessor". As the name implies, this is used to record each ImageProcessor method that gets called - this method list is saved in BFVirtualStack, and re-executed the next time the slice is retrieved from the cache (or from disk).