Changeset 7225


Ignore:
Timestamp:
11/19/10 19:59:52 (9 years ago)
Author:
melissa
Message:

Switched getPixelTypes()/getPixelTypes(String) delegation, so that getPixelTypes() returns all possible pixel types instead of the minimum possible set of pixel types.

This really only affects TIFF/OME-TIFF. Writers should now override getPixelTypes(String) instead of getPixelTypes().

Location:
trunk/components/bio-formats/src/loci/formats
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/FormatWriter.java

    r7149 r7225  
    210210  /* @see IFormatWriter#getPixelTypes() */ 
    211211  public int[] getPixelTypes() { 
     212    return getPixelTypes(getCompression()); 
     213  } 
     214 
     215  /* @see IFormatWriter#getPixelTypes(String) */ 
     216  public int[] getPixelTypes(String codec) { 
    212217    return new int[] {FormatTools.INT8, FormatTools.UINT8, FormatTools.INT16, 
    213218      FormatTools.UINT16, FormatTools.INT32, FormatTools.UINT32, 
    214219      FormatTools.FLOAT}; 
    215   } 
    216  
    217   /* @see IFormatWriter#getPixelTypes(String) */ 
    218   public int[] getPixelTypes(String codec) { 
    219     return getPixelTypes(); 
    220220  } 
    221221 
  • trunk/components/bio-formats/src/loci/formats/out/APNGWriter.java

    r6881 r7225  
    9797  public boolean canDoStacks() { return true; } 
    9898 
    99   /* @see loci.formats.IFormatWriter#getPixelTypes() */ 
    100   public int[] getPixelTypes() { 
     99  /* @see loci.formats.IFormatWriter#getPixelTypes(String) */ 
     100  public int[] getPixelTypes(String codec) { 
    101101    return new int[] {FormatTools.INT8, FormatTools.UINT8, FormatTools.INT16, 
    102102      FormatTools.UINT16}; 
  • trunk/components/bio-formats/src/loci/formats/out/AVIWriter.java

    r6881 r7225  
    209209  public boolean canDoStacks() { return true; } 
    210210 
    211   /* @see loci.formats.IFormatWriter#getPixelTypes() */ 
    212   public int[] getPixelTypes() { 
     211  /* @see loci.formats.IFormatWriter#getPixelTypes(String) */ 
     212  public int[] getPixelTypes(String codec) { 
    213213    return new int[] {FormatTools.UINT8}; 
    214214  } 
  • trunk/components/bio-formats/src/loci/formats/out/EPSWriter.java

    r6881 r7225  
    121121  } 
    122122 
    123   /* @see loci.formats.IFormatWriter#getPixelTypes() */ 
    124   public int[] getPixelTypes() { 
     123  /* @see loci.formats.IFormatWriter#getPixelTypes(String) */ 
     124  public int[] getPixelTypes(String codec) { 
    125125    return new int[] {FormatTools.UINT8}; 
    126126  } 
  • trunk/components/bio-formats/src/loci/formats/out/ICSWriter.java

    r6881 r7225  
    112112  public boolean canDoStacks() { return true; } 
    113113 
    114   /* @see loci.formats.IFormatWriter#getPixelTypes() */ 
    115   public int[] getPixelTypes() { 
     114  /* @see loci.formats.IFormatWriter#getPixelTypes(String) */ 
     115  public int[] getPixelTypes(String codec) { 
    116116    return new int[] {FormatTools.INT8, FormatTools.UINT8, FormatTools.INT16, 
    117117      FormatTools.UINT16, FormatTools.INT32, FormatTools.UINT32, 
  • trunk/components/bio-formats/src/loci/formats/out/ImageIOWriter.java

    r6881 r7225  
    105105  } 
    106106 
    107   /* @see loci.formats.IFormatWriter#getPixelTypes() */ 
    108   public int[] getPixelTypes() { 
     107  /* @see loci.formats.IFormatWriter#getPixelTypes(String) */ 
     108  public int[] getPixelTypes(String codec) { 
    109109    return new int[] {FormatTools.UINT8, FormatTools.UINT16}; 
    110110  } 
  • trunk/components/bio-formats/src/loci/formats/out/JPEG2000Writer.java

    r6881 r7225  
    8787  public boolean canDoStacks() { return false; } 
    8888 
    89   /* @see loci.formats.IFormatWriter#getPixelTypes() */ 
    90   public int[] getPixelTypes() { 
     89  /* @see loci.formats.IFormatWriter#getPixelTypes(String) */ 
     90  public int[] getPixelTypes(String codec) { 
    9191    return new int[] {FormatTools.INT8, FormatTools.UINT8, FormatTools.INT16, 
    9292      FormatTools.UINT16}; 
  • trunk/components/bio-formats/src/loci/formats/out/JPEGWriter.java

    r6881 r7225  
    4444 
    4545  /* @see loci.formats.IFormatWriter#getPixelTypes(String) */ 
    46   public int[] getPixelTypes() { 
     46  public int[] getPixelTypes(String codec) { 
    4747    return new int[] {FormatTools.UINT8}; 
    4848  } 
  • trunk/components/bio-formats/src/loci/formats/out/JavaWriter.java

    r6881 r7225  
    106106  public boolean canDoStacks() { return true; } 
    107107 
    108   /* @see loci.formats.IFormatWriter#getPixelTypes() */ 
    109   public int[] getPixelTypes() { 
     108  /* @see loci.formats.IFormatWriter#getPixelTypes(String) */ 
     109  public int[] getPixelTypes(String codec) { 
    110110    return new int[] { 
    111111      FormatTools.INT8, 
  • trunk/components/bio-formats/src/loci/formats/out/OMEXMLWriter.java

    r7147 r7225  
    165165  /* @see loci.formats.IFormatWriter#getPixelTypes(String) */ 
    166166  public int[] getPixelTypes(String codec) { 
    167     if (codec.equals("J2K") || codec.equals("JPEG")) { 
     167    if (codec != null && (codec.equals("J2K") || codec.equals("JPEG"))) { 
    168168      return new int[] {FormatTools.INT8, FormatTools.UINT8}; 
    169169    } 
    170     return getPixelTypes(); 
     170    return super.getPixelTypes(codec); 
    171171  } 
    172172 
  • trunk/components/bio-formats/src/loci/formats/out/QTWriter.java

    r6881 r7225  
    252252 
    253253  /* @see loci.formats.IFormatWriter#getPixelTypes(String) */ 
    254   public int[] getPixelTypes() { 
     254  public int[] getPixelTypes(String codec) { 
    255255    return new int[] {FormatTools.UINT8}; 
    256256  } 
  • trunk/components/bio-formats/src/loci/formats/out/TiffWriter.java

    r7155 r7225  
    265265  /* @see loci.formats.IFormatWriter#getPixelTypes(String) */ 
    266266  public int[] getPixelTypes(String codec) { 
    267     if (codec.startsWith(COMPRESSION_J2K) || codec.equals(COMPRESSION_JPEG)) { 
     267    if (codec != null && (codec.startsWith(COMPRESSION_J2K) || 
     268      codec.equals(COMPRESSION_JPEG))) 
     269    { 
    268270      return new int[] {FormatTools.INT8, FormatTools.UINT8}; 
    269271    } 
Note: See TracChangeset for help on using the changeset viewer.