Changeset 6604


Ignore:
Timestamp:
06/30/10 13:11:59 (9 years ago)
Author:
curtis
Message:

Readd "Standard ImageJ" stack view option.

Note that non-hyperstacks cannot use CompositeImage, so
color mode support is limited with the Standard ImageJ view.

Location:
trunk/components/loci-plugins/src/loci/plugins
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/loci-plugins/src/loci/plugins/in/Colorizer.java

    r6603 r6604  
    139139      } 
    140140 
    141       final boolean doComposite = mode != -1 && cSize > 1 && cSize <= 7; 
     141      final boolean doComposite = !options.isViewStandard() && 
     142        mode != -1 && cSize > 1 && cSize <= 7; 
    142143      if (doComposite) { 
    143144        CompositeImage compImage = new CompositeImage(imp, mode); 
     
    150151          imp.getProcessor().setColorModel(luts[0]); 
    151152        } 
    152         if (mode != -1 && cSize > 1) { 
     153        if (mode != -1 && cSize > 7) { 
    153154          // NB: Cannot use CompositeImage with more than seven channels. 
    154155          BF.warn(options.isQuiet(), "Data has too many channels for " + 
  • trunk/components/loci-plugins/src/loci/plugins/in/DisplayHandler.java

    r6588 r6604  
    125125  public void displayImage(ImagePlus imp) { 
    126126    if (options.isViewNone()) return; 
     127    else if (options.isViewStandard()) displayNormal(imp); 
    127128    else if (options.isViewHyperstack()) displayNormal(imp); 
    128129    else if (options.isViewBrowser()) displayDataBrowser(imp); 
  • trunk/components/loci-plugins/src/loci/plugins/in/ImagePlusReader.java

    r6598 r6604  
    409409    imp.setDimensions(cCount, zCount, tCount); 
    410410 
    411     imp.setOpenAsHyperStack(true); 
     411    // open as a hyperstack, as appropriate 
     412    boolean hyper = !options.isViewStandard(); 
     413    imp.setOpenAsHyperStack(hyper); 
    412414 
    413415    // apply intensity scaling 
  • trunk/components/loci-plugins/src/loci/plugins/in/ImporterOptions.java

    r6588 r6604  
    9393  // possible values for stackFormat 
    9494  public static final String VIEW_NONE       = "Metadata only"; 
     95  public static final String VIEW_STANDARD   = "Standard ImageJ"; 
    9596  public static final String VIEW_HYPERSTACK = "Hyperstack"; 
    9697  public static final String VIEW_BROWSER    = "Data Browser"; 
     
    197198    String options = Macro.getOptions(); 
    198199 
     200    // NB: It would be nice to remove the Standard ImageJ option someday; 
     201    // when that happens, the following code provides support for old macros. 
    199202    // check obsolete view options 
    200     String stackFormat = options == null ? 
    201       null : Macro.getValue(options, "view", null); 
    202     final String viewStandard = "Standard ImageJ"; 
    203     if (viewStandard.equals(stackFormat)) { 
    204       // Standard ImageJ -> Hyperstack 
    205       options = options.replaceFirst( 
    206         "\\[" + viewStandard + "\\]", VIEW_HYPERSTACK); 
    207       Macro.setOptions(options); 
    208       setStackFormat(VIEW_HYPERSTACK); 
    209     } 
     203    //String stackFormat = options == null ? 
     204    //  null : Macro.getValue(options, "view", null); 
     205    //final String viewStandard = "Standard ImageJ"; 
     206    //if (viewStandard.equals(stackFormat)) { 
     207    //  // Standard ImageJ -> Hyperstack 
     208    //  options = options.replaceFirst( 
     209    //    "\\[" + viewStandard + "\\]", VIEW_HYPERSTACK); 
     210    //  Macro.setOptions(options); 
     211    //  setStackFormat(VIEW_HYPERSTACK); 
     212    //} 
    210213 
    211214    // check obsolete color options 
     
    349352  public String[] getStackFormats() { return getPossible(KEY_STACK_FORMAT); } 
    350353  public boolean isViewNone() { return VIEW_NONE.equals(getStackFormat()); } 
     354  public boolean isViewStandard() { 
     355    return VIEW_STANDARD.equals(getStackFormat()); 
     356  } 
    351357  public boolean isViewHyperstack() { 
    352358    return VIEW_HYPERSTACK.equals(getStackFormat()); 
  • trunk/components/loci-plugins/src/loci/plugins/in/MainDialog.java

    r6588 r6604  
    433433    String stackFormatValue = stackFormatChoice.getSelectedItem(); 
    434434    boolean isStackNone = stackFormatValue.equals(ImporterOptions.VIEW_NONE); 
     435    boolean isStackStandard = 
     436      stackFormatValue.equals(ImporterOptions.VIEW_STANDARD); 
    435437    boolean isStackHyperstack = 
    436438      stackFormatValue.equals(ImporterOptions.VIEW_HYPERSTACK); 
     
    461463 
    462464    // stackOrderChoice 
    463     stackOrderEnabled = false; 
     465    stackOrderEnabled = isStackStandard; 
    464466    if (src == stackFormatChoice) { 
    465467      if (isStackHyperstack || isStackBrowser || isStackImage5D) { 
  • trunk/components/loci-plugins/src/loci/plugins/in/importer-options.txt

    r6588 r6604  
    259259  <br><br>Possible choices are:<ul>                                   \ 
    260260  <li><b>Metadata only</b> - Display no pixels, only metadata.</li>   \ 
     261  <li><b>Standard ImageJ</b> - Display the pixels in ImageJ's         \ 
     262  built-in 2D viewer.</li>                                            \ 
    261263  <li><b>Hyperstack</b> - Display the pixels in ImageJ's              \ 
    262264  built-in 5D viewer.</li>                                            \ 
     
    272274values = \ 
    273275  Metadata only,   \ 
     276  Standard ImageJ, \ 
    274277  Hyperstack,      \ 
    275278  Data Browser,    \ 
     
    289292  <li>Hyperstacks must be in XYCZT order.</li>                         \ 
    290293  <li>Image5D must be in XYCZT order.</li>                             \ 
    291   <li>View5D must be in XYCZT order.</li>                              \ 
     294  <li>View5D must be in XYZCT order.</li>                              \ 
    292295  </ul><b>Example:</b> For a dataset in XYCZT order with 2 channels,   \ 
    293296  3 focal planes and 5 time points, the order would be:<ol>            \ 
  • trunk/components/loci-plugins/src/loci/plugins/macro/LociFunctions.java

    r6588 r6604  
    4343import loci.formats.services.OMEXMLService; 
    4444import loci.plugins.util.ImageProcessorReader; 
    45 import loci.plugins.util.ImagePlusTools; 
    4645import loci.plugins.util.LociPrefs; 
    4746 
     
    165164    ImageProcessor[] ip = r.openProcessors(no.intValue(), 
    166165      x.intValue(), y.intValue(), w.intValue(), h.intValue()); 
     166    // START HERE - add a method to create an ImagePlus from an ImageProcessor[] 
    167167    // CTR FIXME - Ext.openSubImage 
    168168    //ImagePlusTools.makeRGB(title, ip).show(); 
Note: See TracChangeset for help on using the changeset viewer.