/**
* Return an int array with the ids of the pixelSet belonging to the given Key,
* return all camera pixel Ids if the set is not existing
*/
public static int[] getValidPixelSetAsIntArr(Data item, int npix, String pixelSetKey) {
int[] pixels;
//Load a given pixelset, otherwise use the the whole camera
if (pixelSetKey == null) {
ContiguousSet<Integer> numbers = ContiguousSet.create(Range.closed(0, npix - 1), DiscreteDomain.integers());
pixels = Ints.toArray(numbers);
} else {
Utils.isKeyValid(item, pixelSetKey, PixelSet.class);
PixelSet pixelSet = (PixelSet) item.get(pixelSetKey);
pixels = pixelSet.toIntArray();
}
return pixels;
}
Utils.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:fact-tools
作者:
评论列表
文章目录