case PlaneFactory.BYTE: return data.get(offset); case PlaneFactory.SHORT: return data.getShort(offset); case PlaneFactory.INT: return data.getInt(offset); case PlaneFactory.FLOAT: return data.getFloat(offset); case PlaneFactory.DOUBLE: return data.getDouble(offset); }
switch(javaType) { case PlaneFactory.BYTE: return data.get(offset); case PlaneFactory.SHORT: return data.getShort(offset); case PlaneFactory.INT: return data.getInt(offset); case PlaneFactory.FLOAT: return data.getFloat(offset); case PlaneFactory.DOUBLE: return data.getDouble(offset); } } else { switch(javaType) { case PlaneFactory.BYTE: return (short) (data.get(offset) & 0xff); case PlaneFactory.SHORT: return (int) (data.getShort(offset) & 0xffff); case PlaneFactory.INT: return (long) (data.getInt(offset) & 0xffffffffL); } }
	public double getPixelValue(int x1, int x2) 	{		int offset = calculateOffset(x1, x2);		switch(javaType)		{			case PlaneFactory.BYTE:				return data.get(offset);			case PlaneFactory.SHORT:				return data.getShort(offset);			case PlaneFactory.INT:				return data.getInt(offset);			case PlaneFactory.FLOAT:				return data.getFloat(offset);			case PlaneFactory.DOUBLE:				return data.getDouble(offset);		}		throw new RuntimeException("Unknown pixel type.");	}