本文整理汇总了Java中net.imagej.display.ImageDisplayService类的典型用法代码示例。如果您正苦于以下问题:Java ImageDisplayService类的具体用法?Java ImageDisplayService怎么用?Java ImageDisplayService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ImageDisplayService类属于net.imagej.display包,在下文中一共展示了ImageDisplayService类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: drawOverlays
import net.imagej.display.ImageDisplayService; //导入依赖的package包/类
/** Draw appropriate overlays on the image */
private void drawOverlays() {
if(imageDisplay == null)
return;
if(curRoiSet < 0 || curRoiSet >= roiSets.size())
return;
if(!ImageDisplay.class.isInstance(imageDisplay))
throw new IllegalArgumentException("Bad display type.");
imageDisplay.clearOverlaysFast();
imageDisplay.update();
Overlay[] overlays = roiSets.get(curRoiSet)[curImage];
ImageDisplayService ids = ij.get(ImageDisplayService.class);
if(overlays != null)
for(int i = 0; i < overlays.length; i++)
imageDisplay.addFast(overlays[i], ids);
imageDisplay.rebuildNow();
imageDisplay.update();
}
示例2: addFast
import net.imagej.display.ImageDisplayService; //导入依赖的package包/类
/** Add {@code Data} to the display <em>without</em> rebuilding.
* The display must be rebuilt with a call to {@link #rebuildNow() rebuildNow()}
* after {@code Data} addition is complete. This method offers
* a significant performance improvement over repeated calls
* to {@link #add(java.lang.Object) Display.add()}. */
public void addFast(Data data, ImageDisplayService ids) {
DataView dataView;
if (ids == null) {
throw new IllegalStateException(
"An ImageDisplayService is required to display Data objects");
}
dataView = ids.createDataView(data);
if (dataView == null) {
throw new IllegalArgumentException("Unable to create data view!");
}
add(dataView);
}