Changeset 189 for trunk/loci/visbio/view


Ignore:
Timestamp:
02/23/05 18:43:11 (15 years ago)
Author:
curtis
Message:

Progress on arbitrary slice transform.

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

Legend:

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

    r157 r189  
    3737import loci.visbio.state.OptionManager; 
    3838import loci.visbio.state.StateManager; 
     39import loci.visbio.util.VisUtil; 
    3940import visad.*; 
    4041import visad.data.avi.AVIForm; 
     
    280281            // compile frames into a single data object 
    281282            RealType index = RealType.getRealType("index"); 
    282             FunctionType ftype = new FunctionType(index, ff[0].getType()); 
    283             Integer1DSet fset = new Integer1DSet(total); 
    284             FieldImpl field = new FieldImpl(ftype, fset); 
    285             field.setSamples(ff, false); 
     283            FieldImpl field = VisUtil.makeField(ff, index); 
    286284 
    287285            // write data out to AVI file 
  • trunk/loci/visbio/view/StackPanel.java

    r186 r189  
    7474 
    7575    DataTransform trans = (DataTransform) transformList.getSelectedValue(); 
    76     boolean b = trans != null; 
     76    TransformLink tlink = trans == null ? null : handler.getLink(trans); 
     77    boolean b = tlink instanceof StackLink; 
    7778    stackLabel.setEnabled(b); 
    7879    stackBox.setEnabled(b); 
     
    8384    renderRes.setEnabled(b); 
    8485    if (b) { 
    85       StackLink link = (StackLink) handler.getLink(trans); 
     86      StackLink link = (StackLink) tlink; 
    8687 
    8788      // update "stack axis" combo box 
  • trunk/loci/visbio/view/TransformLink.java

    r175 r189  
    269269 
    270270    // initialize thread for handling full-resolution burn-in operations 
    271     burnThread = new Thread(this, "VisBio-BurnThread-" + 
    272       handler.getWindow().getName() + ":" + trans.getName()); 
    273     burnThread.start(); 
     271    if (!trans.isImmediate()) { 
     272      burnThread = new Thread(this, "VisBio-BurnThread-" + 
     273        handler.getWindow().getName() + ":" + trans.getName()); 
     274      burnThread.start(); 
     275    } 
    274276  } 
    275277 
     
    392394   */ 
    393395  protected synchronized void computeData(boolean thumbs) { 
     396    int dim = handler.getWindow().is3D() ? 3 : 2; 
     397    if (dim == 3 && !trans.isValidDimension(3)) dim = 2; 
     398    if (!trans.isValidDimension(dim)) { 
     399      System.err.println("Warning: display \"" + 
     400        handler.getWindow().getName() + 
     401        "\" is incapable of showing data \"" + trans.getName() + "\""); 
     402      return; 
     403    } 
     404 
    394405    int[] pos = handler.getPos(trans); 
    395406    ThumbnailHandler th = trans.getThumbHandler(); 
     
    398409    else { 
    399410      setMessage("loading full-resolution data"); 
    400       Data d = getImageData(pos); 
     411      Data d = dim == 3 ? trans.getData(pos, 3) : getImageData(pos); 
    401412      if (th != null && thumb == null) { 
    402413        // fill in missing thumbnail 
Note: See TracChangeset for help on using the changeset viewer.