Ticket #57 (closed enhancement: fixed)

Opened 13 years ago

Last modified 12 years ago

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) (diff)

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 13 years ago by melissa

  • Priority changed from minor to major

comment:2 Changed 12 years ago by curtis

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

comment:3 Changed 12 years ago 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).

Note: See TracTickets for help on using tickets.