public FlatField getImageDataFrom(final float channel) { FlatField imageData = null; try { MultiDimensionSubset select = null; Hashtable table = dataChoice.getProperties(); Enumeration keys = table.keys(); while (keys.hasMoreElements()) { Object key = keys.nextElement(); if (key instanceof MultiDimensionSubset) { select = (MultiDimensionSubset) table.get(key); } } HashMap subset = select.getSubset(); imageData = data.getImage(channel, subset); uniqueRangeType = RealType.getRealType(rangeType.getName() + "_" + cnt++); imageData = changeRangeType(imageData, uniqueRangeType); } catch (Exception e) { LogUtil.logException("MultiSpectralDisplay.getImageDataFrom", e); } return imageData; }
// TODO: generalize this so that you can grab the image data for any // channel public FlatField getImageData() { try { if ((imageExpired) || (image == null)) { imageExpired = false; MultiDimensionSubset select = null; Hashtable table = dataChoice.getProperties(); Enumeration keys = table.keys(); while (keys.hasMoreElements()) { Object key = keys.nextElement(); if (key instanceof MultiDimensionSubset) { select = (MultiDimensionSubset) table.get(key); } } HashMap subset = select.getSubset(); image = data.getImage(waveNumber, subset); image = changeRangeType(image, uniqueRangeType); } } catch (Exception e) { LogUtil.logException("MultiSpectralDisplay.getImageData", e); } return image; }