io.scif.SCIFIOService Java Examples

The following examples show how to use io.scif.SCIFIOService. 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 vote down vote up
/**
 * 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 vote down vote up
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 vote down vote up
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: ColocalisationTest.java    From imagej-ops with BSD 2-Clause "Simplified" License 4 votes vote down vote up
@Override
protected Context createContext() {
	return new Context(OpService.class, OpMatchingService.class,
		CacheService.class, StatusService.class, SCIFIOService.class);
}
 
Example #5
Source File: AbstractImgIOComponent.java    From scifio with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public AbstractImgIOComponent() {
	this(new Context(SCIFIOService.class, SciJavaService.class));
}