当前位置: 首页>>代码示例>>Java>>正文


Java Context.service方法代码示例

本文整理汇总了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();
   }
 
开发者ID:scijava,项目名称:scijava-jupyter-kernel,代码行数:17,代码来源:ScijavaKernel.java

示例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));
	}
}
 
开发者ID:imagej,项目名称:imagej-ops,代码行数:17,代码来源:SliceTest.java

示例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();
}
 
开发者ID:scijava,项目名称:scijava-jupyter-kernel,代码行数:12,代码来源:InstallScijavaKernel.java

示例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();
    }
 
开发者ID:scijava,项目名称:scijava-jupyter-kernel,代码行数:9,代码来源:TestRunKernel.java

示例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");
}
 
开发者ID:scijava,项目名称:scijava-java3d,代码行数:9,代码来源:Java3DServiceTest.java

示例6: setUp

import org.scijava.Context; //导入方法依赖的package包/类
@Before
public void setUp() {
	context = new Context();
	ops = context.service(OpService.class);
}
 
开发者ID:imagej,项目名称:trackmate-ops,代码行数:6,代码来源:TrackMateLinkerTest.java

示例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();

    }
 
开发者ID:scijava,项目名称:scijava-jupyter-kernel,代码行数:16,代码来源:TestInstallKernel.java


注:本文中的org.scijava.Context.service方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。