org.scijava.service.SciJavaService Java Examples
The following examples show how to use
org.scijava.service.SciJavaService.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SciView.java From sciview with BSD 2-Clause "Simplified" License | 5 votes |
/** * Static launching method */ public static SciView create() throws Exception { SceneryBase.xinitThreads(); System.setProperty( "scijava.log.level:sc.iview", "debug" ); Context context = new Context( ImageJService.class, SciJavaService.class, SCIFIOService.class, ThreadService.class); SciViewService sciViewService = context.service( SciViewService.class ); SciView sciView = sciViewService.getOrCreateActiveSciView(); return sciView; }
Example #2
Source File: SciViewTest.java From sciview with BSD 2-Clause "Simplified" License | 5 votes |
public void nestedNodeDeletionTest() throws Exception { SceneryBase.xinitThreads(); System.setProperty( "scijava.log.level:sc.iview", "debug" ); Context context = new Context( ImageJService.class, SciJavaService.class, SCIFIOService.class, ThreadService.class); SciViewService sciViewService = context.service( SciViewService.class ); SciView sciView = sciViewService.getOrCreateActiveSciView(); Group group = new Group(); final Material material = new Material(); material.setAmbient( new Vector3f( 1.0f, 0.0f, 0.0f ) ); material.setDiffuse( new Vector3f( 1.0f, 0.0f, 0.0f ) ); material.setSpecular( new Vector3f( 1.0f, 1.0f, 1.0f ) ); final Sphere sphere = new Sphere( 1, 20 ); sphere.setMaterial( material ); sphere.setPosition( JOMLVector3.convert( new JOMLVector3(0,0,0) ) ); //sphere.setParent(group); group.addChild(sphere); sciView.addNode(group); Assert.assertEquals( sciView.getAllSceneNodes().length, 7 ); sciView.deleteNode(group); Assert.assertEquals( sciView.getAllSceneNodes().length, 6 ); sciView.closeWindow(); }
Example #3
Source File: SciViewTest.java From sciview with BSD 2-Clause "Simplified" License | 4 votes |
public void nodeDeletionTest() throws Exception { SceneryBase.xinitThreads(); System.setProperty( "scijava.log.level:sc.iview", "debug" ); Context context = new Context( ImageJService.class, SciJavaService.class, SCIFIOService.class, ThreadService.class); SciViewService sciViewService = context.service( SciViewService.class ); SciView sciView = sciViewService.getOrCreateActiveSciView(); Node sphere = sciView.addSphere(); Assert.assertEquals( sciView.getAllSceneNodes().length, 7 ); sciView.deleteNode(sphere); Assert.assertEquals( sciView.getAllSceneNodes().length, 6 ); sciView.closeWindow(); }
Example #4
Source File: AbstractImgIOComponent.java From scifio with BSD 2-Clause "Simplified" License | 4 votes |
public AbstractImgIOComponent() { this(new Context(SCIFIOService.class, SciJavaService.class)); }
Example #5
Source File: SCIFIO.java From scifio with BSD 2-Clause "Simplified" License | 2 votes |
/** * Creates a new SCIFIO application context with all SCIFIO and SciJava * services. */ public SCIFIO() { this(new Context(SciJavaService.class, SCIFIOService.class)); }