Coder Social home page Coder Social logo

bonej-sandbox's People

Forkers

hinerm

bonej-sandbox's Issues

Tests in the datasetCheck package crash

Tests in the datasetCheck package crash when run with other tests classes, but pass when run by themselves. This is somehow related to the incompatibility issues between ImageJ1 and ImageJ2. All test cases crash with:

java.lang.ExceptionInInitializerError
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.junit.runners.BlockJUnit4ClassRunner.createTest(BlockJUnit4ClassRunner.java:217)
    at org.junit.runners.BlockJUnit4ClassRunner$1.runReflectiveCall(BlockJUnit4ClassRunner.java:266)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.BlockJUnit4ClassRunner.methodBlock(BlockJUnit4ClassRunner.java:263)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runners.Suite.runChild(Suite.java:128)
    at org.junit.runners.Suite.runChild(Suite.java:27)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
Caused by: java.lang.IllegalArgumentException: Invalid service: net.imagej.legacy.LegacyConsoleService
    at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:280)
    at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:231)
    at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:194)
    at org.scijava.service.ServiceHelper.loadServices(ServiceHelper.java:166)
    at org.scijava.Context.<init>(Context.java:277)
    at org.scijava.Context.<init>(Context.java:234)
    at org.scijava.Context.<init>(Context.java:174)
    at org.scijava.Context.<init>(Context.java:160)
    at net.imagej.ImageJ.<init>(ImageJ.java:79)
    at protoOps.datasetCheck.TestDatasetIs3D.<clinit>(TestDatasetIs3D.java:20)
    ... 33 more
Caused by: java.lang.IllegalArgumentException: Invalid service: net.imagej.legacy.LegacyService
    at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:280)
    at org.scijava.service.ServiceHelper.loadService(ServiceHelper.java:231)
    at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:340)
    at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:269)
    ... 42 more
Caused by: java.lang.ExceptionInInitializerError
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at java.lang.Class.newInstance(Class.java:442)
    at org.scijava.service.ServiceHelper.createServiceRecursively(ServiceHelper.java:302)
    at org.scijava.service.ServiceHelper.createExactService(ServiceHelper.java:269)
    ... 45 more
Caused by: java.lang.RuntimeException: No _hooks field found in ij.IJ
It appears that this class was already defined in the class loader!
Please make sure that you initialize the LegacyService before using
any ImageJ 1.x class. You can do that by adding this static initializer:

    static {
        LegacyInjector.preinit();
    }

To debug this issue, start the JVM with the option:

    -javaagent:/home/rdom/.m2/repository/net/imagej/ij1-patcher/0.12.3/ij1-patcher-0.12.3.jar

To enforce pre-initialization, start the JVM with the option:

    -javaagent:/home/rdom/.m2/repository/net/imagej/ij1-patcher/0.12.3/ij1-patcher-0.12.3.jar=init

    at net.imagej.patcher.CodeHacker.javaAgentHint(CodeHacker.java:828)
    at net.imagej.patcher.LegacyInjector.alreadyPatched(LegacyInjector.java:433)
    at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:380)
    at net.imagej.patcher.LegacyInjector.preinit(LegacyInjector.java:376)
    at net.imagej.legacy.LegacyService.<clinit>(LegacyService.java:133)
    ... 52 more
Caused by: java.lang.NoSuchFieldException: _hooks
    at java.lang.Class.getField(Class.java:1703)
    at net.imagej.patcher.LegacyInjector.alreadyPatched(LegacyInjector.java:424)
    ... 55 more

Test image creators fail when run from Java API

All of the test image creator ops (crossed circle, cuboid, wire frame cuboid) when instantiated and run from Java. They need to inherit AbstractContextual.setContext to work properly. Also document to the class files how they can be run from Java and an opService.

VolumeFractionSurface returns wrong results with a ROIManager

VolumeFractionSurface returns the following results when run with a ROIManager:

Bone volume: 0.000 Total volume: 0.000 Ratio: NaN

The ROIManager contains one rectangular roi (0, 0, w, h) on slice number 1.

At a similar setup BoneJ1 produces the results:

Bone volume: 0.002 Total volume: 0.017 Ratio: 0.109

Test image used: binary_trabeculae_small.tif
Resampling: 6

Improve the accuracy of VolumeFractionSurface

The accuracy of the surface volume measurement could be possibly improved by ignoring mesh faces which intersect the stack edges. The reason for this is that samples are often cut from larger objects. This cutting creates cross-sectional faces, which in reality are not part of the surface area of the whole object.

VolumeFractionSurface reports wrong fraction

The surface algorithm reports that the volume fraction for every image is 1.0, e.g. bone volume equals total volume. This may have something to do with the fact that the implementation of MCTriangulator and/or CustomTriangleMesh has changed. The drawing of the surface masks seems to work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.