Changeset 493 for trunk/loci/visbio/view


Ignore:
Timestamp:
07/15/05 14:39:42 (15 years ago)
Author:
curtis
Message:

Add option to configure eye separation distance for stereo displays.

Location:
trunk/loci/visbio/view
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/visbio/view/DisplayManager.java

    r465 r493  
    4444  public static final int DEFAULT_STACK_RESOLUTION = 192; 
    4545 
     46  /** Default eye separation distance for stereo displays. */ 
     47  public static final double DEFAULT_EYE_SEPARATION = 0.002; 
     48 
    4649  /** String for image stack resolution limit option. */ 
    4750  public static final String STACK_LIMIT = "Limit image stack resolution"; 
     51 
     52  /** String for eye separation setting. */ 
     53  public static final String EYE_DISTANCE = "Stereo eye separation"; 
    4854 
    4955  /** String for ImageJ quit warning. */ 
     
    216222    om.addOption("Visualization", new ResolutionToggleOption(STACK_LIMIT, 'l', 
    217223      "Adjusts resolution limit of image stacks", true, stackRes, stackRes)); 
     224    om.addNumericOption("Visualization", EYE_DISTANCE, null, 
     225      "Adjusts eye separation for stereo displays", DEFAULT_EYE_SEPARATION); 
    218226    om.addBooleanOption("Warnings", WARN_IMAGEJ, 'i', 
    219227      "Toggles whether VisBio displays a warning about " + 
  • trunk/loci/visbio/view/ViewHandler.java

    r465 r493  
    2828import loci.visbio.data.DataTransform; 
    2929import loci.visbio.data.ImageTransform; 
    30 import loci.visbio.state.Saveable; 
    31 import loci.visbio.state.SaveException; 
    32 import loci.visbio.util.ObjectUtil; 
    33 import loci.visbio.util.VisUtil; 
    34 import loci.visbio.util.XMLUtil; 
     30import loci.visbio.state.*; 
     31import loci.visbio.util.*; 
    3532import org.w3c.dom.Element; 
    3633import visad.*; 
     
    338335    toggleParallel(parallel); 
    339336 
     337    // configure eye separation distance 
     338    OptionManager om = (OptionManager) 
     339      window.getVisBio().getManager(OptionManager.class); 
     340    NumericOption eye = (NumericOption) 
     341      om.getOption(DisplayManager.EYE_DISTANCE); 
     342    double position = eye.getFloatingValue(); 
     343    VisUtil.setEyeSeparation(window.getDisplay(), position); 
     344 
    340345    if (panel == null) panel = new ViewPanel(this); 
    341346  } 
Note: See TracChangeset for help on using the changeset viewer.