Back to ObjectJ examples

Perspective Stack View

Author: Norbert Vischer (vischer at uva.nl)
History: 2012-Dec-20: First version
2013-Apr-03: Using RGB+alpha channel for transparency
2013-Apr-07: Additive color mixing during overlap
2013-Apr-10: Choice for channel sequence and perspective
2013-Apr-12: Choice to expand from top, center, bottom
2014-Oct-07: Choice to add colours in 1st frame; use "Fluorescent Cells" as demo
2016-May-24: Transparent Background compatible with IJ1.50
Source: PerspectiveStackView.txt
Description: This macro creates a perspective view of a (hyper)stack to be used in presentations or publications
Features:
  • Adjustable perspective and channel sequence
  • Option to illustrate color mixing during overlap
  • Still image can be saved with transparent background
  • Animated stack can be saved as .AVI

Macro Commands:
Open Fluorescent Cells [1]

Downloads IJ sample image "Fluorescent Cells" and adapts fore- and background color

Create Demo Stack

Creates a hyperstack to test perspective view of circular objects, and adapts fore- and background color

Make Perspective Animation [2]

Uses current (hyper)stack (or selection) to create perspective animation.
You can double-click the eyedropper tool to adjust foreground color (used for border) and background color before issuing this command.

Save View with Transparent Background [3]

This option is mainly intended for animations without color mixing. Current time point of animation is saved as still image in .PNG format with transparent background. Programs like PowerPoint will honor transparency, so that non-rectangular objects blend nicely with any gradient background. For adding shadow as shown in Fig 2, choose in PowerPoint: Format>Picture>Shadow

Save Animation as AVI [4]

Saves expanding stack as .avi movie. You may need to convert to other codecs when importing the movie elsewhere.



Fig 1: Dialog box



Fig 2: Neuron (IJ sample image) shown in PowerPoint with soft shadow


Fig 3: Animation of an expanding perspective stack




Fig 4: Additive colors if "Color Mixing" is checked




Fig 5: Demo stack and geometric properties


Back to ObjectJ examples