• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.server
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Change
  • Next Change →

Changeset 821 for trunk/components/rendering/src/omeis/providers/re/data/PlaneFactory.java

Show
Ignore:
Timestamp:
07/25/06 14:44:49 (2 years ago)
Author:
brain
Message:

Added functionality to check for signed types in the pixel data to fix a bug with large global min/max ranges.

Files:
1 modified

  • trunk/components/rendering/src/omeis/providers/re/data/PlaneFactory.java (modified) (1 diff)

Legend:

Unmodified
Added
Removed
  • trunk/components/rendering/src/omeis/providers/re/data/PlaneFactory.java

    r734 r821  
    115115                                + type.getValue() + "'"); 
    116116    } 
     117     
     118    /** 
     119     * A static helper method to retrieve pixel byte signage. 
     120     *  
     121     * @param type The pixels type for which you want to know the byte width. 
     122     * @return The number of bytes per pixel value. 
     123     */ 
     124    static boolean isTypeSigned(PixelsType type) 
     125    { 
     126        if (in(type, new String[] {"uint8", "uint16", "uint32"})) 
     127            return false; 
     128        else if (in(type, new String[] { "int8", "int16", "int32", "float", "double"})) 
     129            return true; 
     130        else 
     131            throw new RuntimeException("Unknown pixel type: '" 
     132                    + type.getValue() + "'"); 
     133    } 
     134     
    117135     
    118136    /** 

Download in other formats:

  • Unified Diff
  • Zip Archive

Trac Powered

Powered by Trac 0.11
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/