本文整理汇总了Java中org.scijava.Context.service方法的典型用法代码示例。如果您正苦于以下问题:Java Context.service方法的具体用法?Java Context.service怎么用?Java Context.service使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.scijava.Context
的用法示例。
在下文中一共展示了Context.service方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import org.scijava.Context; //导入方法依赖的package包/类
public static void main(String... args) {
final Context context = new Context();
// Remove the Display and Results post-processors to prevent output
// windows from being displayed
final PluginService pluginService = context.service(PluginService.class);
final PluginInfo<SciJavaPlugin> display = pluginService.getPlugin(DisplayPostprocessor.class);
final PluginInfo<SciJavaPlugin> results = pluginService.getPlugin(ResultsPostprocessor.class);
pluginService.removePlugin(display);
pluginService.removePlugin(results);
JupyterService jupyter = context.service(JupyterService.class);
jupyter.runKernel(args);
context.dispose();
}
示例2: setUp
import org.scijava.Context; //导入方法依赖的package包/类
@Override
@Before
public void setUp() {
context = new Context(OpService.class);
ops = context.service(OpService.class);
in = ArrayImgs.bytes(20, 20, 21);
out = ArrayImgs.bytes(20, 20, 21);
// fill array img with values (plane position = value in px);
for (final Cursor<ByteType> cur = in.cursor(); cur.hasNext();) {
cur.fwd();
cur.get().set((byte) cur.getIntPosition(2));
}
}
示例3: main
import org.scijava.Context; //导入方法依赖的package包/类
public static void main(String... args) {
Context context = new Context();
LogService log = context.service(LogService.class);
log.setLevel(LogLevel.INFO);
JupyterService jupyter = context.service(JupyterService.class);
jupyter.installKernel(args);
context.dispose();
}
示例4: main
import org.scijava.Context; //导入方法依赖的package包/类
public static void main(final String[] args) {
// Warning : if run from your IDE the classpath won't be set to your Fiji installation
Context context = new Context();
JupyterService jupyter = context.service(JupyterService.class);
jupyter.runKernel("jython", "info", "");
context.dispose();
}
示例5: setUp
import org.scijava.Context; //导入方法依赖的package包/类
@Before
public void setUp() throws IOException {
context = new Context(Java3DService.class);
j3d = context.service(Java3DService.class);
tmp1 = FileUtils.createTemporaryDirectory("libExt", "1");
tmp2 = FileUtils.createTemporaryDirectory("libExt", "2");
}
示例6: setUp
import org.scijava.Context; //导入方法依赖的package包/类
@Before
public void setUp() {
context = new Context();
ops = context.service(OpService.class);
}
示例7: main
import org.scijava.Context; //导入方法依赖的package包/类
public static void main(String... args) {
String pythonBinaryPath = "/home/hadim/local/conda/bin/python";
Context context = new Context();
JupyterService jupyter = context.service(JupyterService.class);
ScriptService scriptService = context.service(ScriptService.class);
//jupyter.installKernel("groovy", "info", pythonBinaryPath);
System.out.println(scriptService.getLanguages());
context.dispose();
}