GithubHelp home page GithubHelp logo

saalfeldlab / bigcat Goto Github PK

View Code? Open in Web Editor NEW
8.0 8.0 16.0 8.46 MB

Collaborative volume annotation and segmentation with BigDataViewer

License: GNU General Public License v2.0

Java 99.48% Shell 0.52%

bigcat's People

Contributors

axtimwalde avatar bogovicj avatar emilmelnikov avatar funkey avatar gitter-badger avatar hanslovsky avatar jni avatar mkitti avatar tpietzsch avatar wolny avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bigcat's Issues

Dimensions off by 1 in DvidGrayscale8SetupImageLoader

https://github.com/saalfeldlab/bigcat/blob/labels/src/main/java/bdv/img/dvid/DvidGrayscale8SetupImageLoader.java#L73
Currently:

dimensions = new long[]{
                dataInstance.Extended.MaxPoint[ 0 ] - dataInstance.Extended.MinPoint[ 0 ],
                dataInstance.Extended.MaxPoint[ 1 ] - dataInstance.Extended.MinPoint[ 1 ],
                dataInstance.Extended.MaxPoint[ 2 ] - dataInstance.Extended.MinPoint[ 2 ] };

However, MaxPoint is contained in the interval, thus, each dimension should be increased by one:

dimensions = new long[]{
                dataInstance.Extended.MaxPoint[ 0 ] + 1 - dataInstance.Extended.MinPoint[ 0 ],
                dataInstance.Extended.MaxPoint[ 1 ] + 1 - dataInstance.Extended.MinPoint[ 1 ],
                dataInstance.Extended.MaxPoint[ 2 ] + 1 - dataInstance.Extended.MinPoint[ 2 ] };

Let me know, if I'm wrong. Otherwise, I'll create a pull request.

Get rid of BigDataViewer dependency

Historically, bigcat used bdv for viewing data. Thus, source management as grown around that and goes through hoops to accomodate. We should get rid of bdv dependencies entirely (especially ViewerState and SourceState) for better source and data management.

Add DVID loader

Currently we do not have a DVID loader in BigCAT v2. We would like to add that, including a dialog to open a data set from the UI.

Remove modes

We do not need them anymore and they just complicate things.

Extract label multiset type

I started working on extracting the LabelMultisetType (and related) to be able to use it in other environments (e.g. spark downsampling) without a dependency on BigCAT. I have not currently set up a repository but will do so sometime this week. This repository will most likely temporary. Eventually, we should choose out of one of these three options:

  1. add LabelMultisetType to imglib2 core
  2. create new repository for LabelMultisetType in the imglib namespace (e.g. imglib2-labels, imglib2-label-multisets, etc.)
  3. create new repository in a different namespace, e.g. saalfeldlab
    I am in favor of (1) or (2). Please comment @axtimwalde @tpietzsch

Also, we are currently using UNSAFE to write and read into long[] arrays at arbitrary locations. We could replace UNSAFE with ByteBuffer:

  • pro:
    • avoid use of restricted api
  • con:

Unify opener dialogs

We currently have openers for n5 and h5 (and probably dvid, soon) that all do similar things. In oder to reduce code duplication and reduce clutter/potential for bugs, we should unify them and

  • encapsulate common behavior in one or more classes, and
  • decouple ui and data

mesh generation deadlock

The newest mesh generation changes lead to a dead lock on my workstation, not on my notebook. Difference between workstation and notebook is the number of available cores. Example deadlock:

"Thread-896" #941 prio=5 os_prio=0 tid=0x00007f83d4312000 nid=0x6400 waiting for monitor entry [0x00007f83467b9000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at bdv.bigcat.viewer.viewer3d.Viewer3DControllerFX.removeMesh(Viewer3DControllerFX.java:134)
	- waiting to lock <0x00007f85ad0fbc38> (a bdv.bigcat.viewer.viewer3d.Viewer3DControllerFX)
	at bdv.bigcat.viewer.atlas.mode.RenderNeuron.lambda$2(RenderNeuron.java:161)
	at bdv.bigcat.viewer.atlas.mode.RenderNeuron$$Lambda$449/1626105489.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:748)

   Locked ownable synchronizers:
	- None

is the same for all mesh generation threads except for

"Thread-724" #769 prio=5 os_prio=0 tid=0x00007f83d40dc800 nid=0x6340 waiting for monitor entry [0x00007f8382a52000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at bdv.bigcat.viewer.viewer3d.NeuronFX.cancel(NeuronFX.java:107)
	- waiting to lock <0x00007f85faf3ab20> (a com.sun.javafx.collections.ObservableListWrapper)
	at bdv.bigcat.viewer.viewer3d.NeuronRendererFX$$Lambda$418/1055869074.accept(Unknown Source)
	at java.util.Optional.ifPresent(Optional.java:159)
	at bdv.bigcat.viewer.viewer3d.NeuronRendererFX.cancelRendering(NeuronRendererFX.java:183)
	- locked <0x00007f85fa4e5d38> (a bdv.bigcat.viewer.viewer3d.NeuronRendererFX)
	at bdv.bigcat.viewer.viewer3d.NeuronRendererFX.removeSelfFromScene(NeuronRendererFX.java:188)
	- locked <0x00007f85fa4e5d38> (a bdv.bigcat.viewer.viewer3d.NeuronRendererFX)
	at bdv.bigcat.viewer.viewer3d.Viewer3DControllerFX$$Lambda$406/873930090.accept(Unknown Source)
	at java.lang.Iterable.forEach(Iterable.java:75)
	at bdv.bigcat.viewer.viewer3d.Viewer3DControllerFX.generateMesh(Viewer3DControllerFX.java:94)
	- locked <0x00007f85ad3f70c8> (a java.util.HashSet)
	- locked <0x00007f85ad0fbc38> (a bdv.bigcat.viewer.viewer3d.Viewer3DControllerFX)
	at bdv.bigcat.viewer.atlas.mode.RenderNeuron.lambda$1(RenderNeuron.java:144)
	at bdv.bigcat.viewer.atlas.mode.RenderNeuron$$Lambda$402/431825596.run(Unknown Source)
	at java.lang.Thread.run(Thread.java:748)

   Locked ownable synchronizers:
	- None

with pools

   java.lang.Thread.State: BLOCKED (on object monitor)
	at bdv.bigcat.viewer.viewer3d.NeuronFX.submitForOffset(NeuronFX.java:222)
	- waiting to lock <0x00007f85faf3ab20> (a com.sun.javafx.collections.ObservableListWrapper)
	at bdv.bigcat.viewer.viewer3d.NeuronFX.lambda$7(NeuronFX.java:213)
	at bdv.bigcat.viewer.viewer3d.NeuronFX$$Lambda$428/730186106.run(Unknown Source)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

   Locked ownable synchronizers:
	- <0x00007f85fb1728c8> (a java.util.concurrent.ThreadPoolExecutor$Worker)

"pool-2-thread-2" #740 prio=5 os_prio=0 tid=0x00007f8334018000 nid=0x619d waiting on condition [0x00007f83442d6000]
   java.lang.Thread.State: WAITING (parking)
	at sun.misc.Unsafe.park(Native Method)
	- parking to wait for  <0x00007f85faf3ace8> (a java.util.concurrent.FutureTask)
	at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
	at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:429)
	at java.util.concurrent.FutureTask.get(FutureTask.java:191)
	at bdv.bigcat.viewer.viewer3d.NeuronFX.lambda$12(NeuronFX.java:231)
	- locked <0x00007f85faf3ab20> (a com.sun.javafx.collections.ObservableListWrapper)
	at bdv.bigcat.viewer.viewer3d.NeuronFX$$Lambda$429/1903053443.run(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

   Locked ownable synchronizers:
	- <0x00007f85fb104928> (a java.util.concurrent.ThreadPoolExecutor$Worker)

"pool-2-thread-1" #739 prio=5 os_prio=0 tid=0x00007f8334017000 nid=0x619c waiting for monitor entry [0x00007f8382b53000]
   java.lang.Thread.State: BLOCKED (on object monitor)
	at bdv.bigcat.viewer.viewer3d.NeuronFX.submitForOffset(NeuronFX.java:222)
	- waiting to lock <0x00007f85faf3ab20> (a com.sun.javafx.collections.ObservableListWrapper)
	at bdv.bigcat.viewer.viewer3d.NeuronFX.lambda$7(NeuronFX.java:213)
	at bdv.bigcat.viewer.viewer3d.NeuronFX$$Lambda$428/730186106.run(Unknown Source)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

   Locked ownable synchronizers:
	- <0x00007f85fb104f98> (a java.util.concurrent.ThreadPoolExecutor$Worker)

Accidental double use of locks?

Make Label.BACKGROUND transparent in viewer

Currently we assign a color with non-zero alpha. This should not be the case. When fixing this, also ensure that the other remaining special purpose ids defined in the Label class are treated properly. For some of them it may make sense to assign and expose color as a parameter.

Cannot compile bigcat (cannot find symbol H5CellLoader)

maven fails with the following output:

$ mvn clean package
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building BIGCAT 0.0.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading from imagej.public: https://maven.imagej.net/content/groups/public/net/imglib2/imglib2/4.6.0-SNAPSHOT/maven-metadata.xml
Downloaded from imagej.public: https://maven.imagej.net/content/groups/public/net/imglib2/imglib2/4.6.0-SNAPSHOT/maven-metadata.xml (1.4 kB at 1.9 kB/s)
[INFO] 
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ bigcat ---
[INFO] 
[INFO] --- build-helper-maven-plugin:1.12:regex-property (sanitize-version) @ bigcat ---
[INFO] 
[INFO] Executing: /bin/sh -c cd '/home/hanslovskyp/workspace/bigcat-future/bigcat' && 'git' 'rev-parse' '--verify' 'HEAD'
[INFO] Working directory: /home/hanslovskyp/workspace/bigcat-future/bigcat
[INFO] Storing buildScmBranch: javafx-generic-listeners
[INFO] 
[INFO] --- scijava-maven-plugin:1.0.0:set-rootdir (set-rootdir) @ bigcat ---
[INFO] Setting rootdir: /home/hanslovskyp/workspace/bigcat-future/bigcat
[INFO] 
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ bigcat ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 7 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.6.0:compile (default-compile) @ bigcat ---
[INFO] Compiling 137 source files to /home/hanslovskyp/workspace/bigcat-future/bigcat/target/classes
[WARNING] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/labels/labelset/ByteUtils.java:[7,16] sun.misc.Unsafe is internal proprietary API and may be removed in a future release
[WARNING] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/labels/labelset/ByteUtils.java:[102,107] sun.misc.Unsafe is internal proprietary API and may be removed in a future release
[WARNING] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/labels/labelset/ByteUtils.java:[105,40] sun.misc.Unsafe is internal proprietary API and may be removed in a future release
[WARNING] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/labels/labelset/ByteUtils.java:[107,61] sun.misc.Unsafe is internal proprietary API and may be removed in a future release
[WARNING] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/labels/labelset/ByteUtils.java:[109,50] sun.misc.Unsafe is internal proprietary API and may be removed in a future release
[INFO] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/img/h5/H5Utils.java: /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/img/h5/H5Utils.java uses or overrides a deprecated API.
[INFO] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/img/h5/H5Utils.java: Recompile with -Xlint:deprecation for details.
[INFO] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/bigcat/viewer/bdvfx/MultiResolutionRendererGeneric.java: Some input files use unchecked or unsafe operations.
[INFO] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/bigcat/viewer/bdvfx/MultiResolutionRendererGeneric.java: Recompile with -Xlint:unchecked for details.
[INFO] 
[INFO] --- maven-resources-plugin:3.0.2:testResources (default-testResources) @ bigcat ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/hanslovskyp/workspace/bigcat-future/bigcat/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.6.0:testCompile (default-testCompile) @ bigcat ---
[INFO] Compiling 6 source files to /home/hanslovskyp/workspace/bigcat-future/bigcat/target/test-classes
[INFO] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/test/java/bdv/bigcat/viewer/atlas/solver/SolverQueueServerZMQTest.java: /home/hanslovskyp/workspace/bigcat-future/bigcat/src/test/java/bdv/bigcat/viewer/atlas/solver/SolverQueueServerZMQTest.java uses or overrides a deprecated API.
[INFO] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/test/java/bdv/bigcat/viewer/atlas/solver/SolverQueueServerZMQTest.java: Recompile with -Xlint:deprecation for details.
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/test/java/bdv/img/h5/H5UtilsTest.java:[153,23] cannot find symbol
  symbol:   class H5CellLoader
  location: class bdv.img.h5.H5UtilsTest
[ERROR] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/test/java/bdv/img/h5/H5UtilsTest.java:[153,73] cannot find symbol
  symbol:   class H5CellLoader
  location: class bdv.img.h5.H5UtilsTest
[INFO] 2 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.275 s
[INFO] Finished at: 2017-11-13T07:51:52-05:00
[INFO] Final Memory: 40M/322M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:testCompile (default-testCompile) on project bigcat: Compilation failure: Compilation failure: 
[ERROR] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/test/java/bdv/img/h5/H5UtilsTest.java:[153,23] cannot find symbol
[ERROR]   symbol:   class H5CellLoader
[ERROR]   location: class bdv.img.h5.H5UtilsTest
[ERROR] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/test/java/bdv/img/h5/H5UtilsTest.java:[153,73] cannot find symbol
[ERROR]   symbol:   class H5CellLoader
[ERROR]   location: class bdv.img.h5.H5UtilsTest
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

NullPointerException on startup

I think it is related to recent changes in label interpolation:

7ae3bae

java.lang.reflect.InvocationTargetException
    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 org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:293)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
    at bdv.img.cache.VolatileGlobalCellCache.createGlobal(VolatileGlobalCellCache.java:528)
    at bdv.img.cache.VolatileGlobalCellCache$VolatileCellCache.load(VolatileGlobalCellCache.java:653)
    at bdv.img.cache.VolatileImgCells$CachedCells.get(VolatileImgCells.java:110)
    at bdv.img.cache.VolatileImgCells$CachedCells.get(VolatileImgCells.java:92)
    at net.imglib2.img.list.ListRandomAccess.get(ListRandomAccess.java:81)
    at net.imglib2.img.cell.CellRandomAccess.getCell(CellRandomAccess.java:130)
    at net.imglib2.img.cell.CellRandomAccess.updatePosition(CellRandomAccess.java:470)
    at net.imglib2.img.cell.CellRandomAccess.<init>(CellRandomAccess.java:124)
    at net.imglib2.img.cell.AbstractCellImg.randomAccess(AbstractCellImg.java:126)
    at net.imglib2.img.cell.AbstractCellImg.randomAccess(AbstractCellImg.java:48)
    at net.imglib2.outofbounds.AbstractOutOfBoundsValue.<init>(AbstractOutOfBoundsValue.java:83)
    at net.imglib2.outofbounds.OutOfBoundsConstantValue.<init>(OutOfBoundsConstantValue.java:60)
    at net.imglib2.outofbounds.OutOfBoundsConstantValueFactory.create(OutOfBoundsConstantValueFactory.java:71)
    at net.imglib2.outofbounds.OutOfBoundsConstantValueFactory.create(OutOfBoundsConstantValueFactory.java:48)
    at net.imglib2.view.ExtendedRandomAccessibleInterval.randomAccess(ExtendedRandomAccessibleInterval.java:75)
    at net.imglib2.view.ExtendedRandomAccessibleInterval.randomAccess(ExtendedRandomAccessibleInterval.java:54)
    at net.imglib2.interpolation.randomaccess.NearestNeighborInterpolator.<init>(NearestNeighborInterpolator.java:75)
    at net.imglib2.interpolation.randomaccess.NearestNeighborInterpolatorFactory.create(NearestNeighborInterpolatorFactory.java:57)
    at net.imglib2.interpolation.randomaccess.NearestNeighborInterpolatorFactory.create(NearestNeighborInterpolatorFactory.java:52)
    at net.imglib2.interpolation.Interpolant.realRandomAccess(Interpolant.java:70)
    at net.imglib2.realtransform.RealTransformRealRandomAccessible$RealTransformRealRandomAccess.<init>(RealTransformRealRandomAccessible.java:76)
    at net.imglib2.realtransform.AffineRealRandomAccessible$AffineRealRandomAccess.<init>(AffineRealRandomAccessible.java:69)
    at net.imglib2.realtransform.AffineRealRandomAccessible.realRandomAccess(AffineRealRandomAccessible.java:267)
    at net.imglib2.realtransform.AffineRealRandomAccessible.realRandomAccess(AffineRealRandomAccessible.java:55)
    at bdv.bigcat.MergeController.<init>(MergeController.java:100)
    at bdv.bigcat.BigCATAriadne.main(BigCATAriadne.java:161)
    ... 6 more

Occured when launching BigCATAriadne.java.

3D viewer unresponsive with moderately large objects

With any object that has a few thousand mesh blocks, the entire applications becomes unusably slow. At this level, single triangles are still visible for the entire object, i.e. the number of triangles is not expected to be too large for the graphics card. My graphics card is a Titan X with 32GB, this should work. If this is a limit of JavaFX 3D we should run away from it... fast!

Incompatible types error in DataSource when compiling with maven

This can probably be fixed by correcting the generic parameters of DataSource.createN5MipmapRawSource.

error log:

$ mvn clean package
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building BIGCAT 0.0.3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ bigcat ---
[INFO] Deleting /home/hanslovskyp/workspace/bigcat-future/bigcat/target
[INFO] 
[INFO] --- build-helper-maven-plugin:1.12:regex-property (sanitize-version) @ bigcat ---
[INFO] 
[INFO] Executing: /bin/sh -c cd '/home/hanslovskyp/workspace/bigcat-future/bigcat' && 'git' 'rev-parse' '--verify' 'HEAD'
[INFO] Working directory: /home/hanslovskyp/workspace/bigcat-future/bigcat
[INFO] Storing buildNumber: 36820ec4ae7654695d378a8ab5af6fc2f8ca2a43 at timestamp: 1510676596853
[INFO] Storing buildScmBranch: javafx-generic-listeners
[INFO] 
[INFO] --- scijava-maven-plugin:1.0.0:set-rootdir (set-rootdir) @ bigcat ---
[INFO] Setting rootdir: /home/hanslovskyp/workspace/bigcat-future/bigcat
[INFO] 
[INFO] --- maven-resources-plugin:3.0.2:resources (default-resources) @ bigcat ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 7 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.6.0:compile (default-compile) @ bigcat ---
[INFO] Compiling 139 source files to /home/hanslovskyp/workspace/bigcat-future/bigcat/target/classes
[INFO] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/img/h5/H5Utils.java: /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/img/h5/H5Utils.java uses or overrides a deprecated API.
[INFO] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/img/h5/H5Utils.java: Recompile with -Xlint:deprecation for details.
[INFO] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/bigcat/viewer/bdvfx/MultiResolutionRendererGeneric.java: Some input files use unchecked or unsafe operations.
[INFO] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/bigcat/viewer/bdvfx/MultiResolutionRendererGeneric.java: Recompile with -Xlint:unchecked for details.
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING : 
[INFO] -------------------------------------------------------------
[WARNING] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/labels/labelset/ByteUtils.java:[7,16] sun.misc.Unsafe is internal proprietary API and may be removed in a future release
[WARNING] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/labels/labelset/ByteUtils.java:[7,16] sun.misc.Unsafe is internal proprietary API and may be removed in a future release
[WARNING] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/labels/labelset/ByteUtils.java:[7,16] sun.misc.Unsafe is internal proprietary API and may be removed in a future release
[WARNING] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/labels/labelset/ByteUtils.java:[96,30] sun.misc.Unsafe is internal proprietary API and may be removed in a future release
[WARNING] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/labels/labelset/ByteUtils.java:[102,58] sun.misc.Unsafe is internal proprietary API and may be removed in a future release
[WARNING] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/labels/labelset/ByteUtils.java:[102,107] sun.misc.Unsafe is internal proprietary API and may be removed in a future release
[WARNING] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/labels/labelset/ByteUtils.java:[105,40] sun.misc.Unsafe is internal proprietary API and may be removed in a future release
[WARNING] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/labels/labelset/ByteUtils.java:[107,61] sun.misc.Unsafe is internal proprietary API and may be removed in a future release
[WARNING] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/labels/labelset/ByteUtils.java:[109,50] sun.misc.Unsafe is internal proprietary API and may be removed in a future release
[INFO] 9 warnings 
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/bigcat/viewer/atlas/data/DataSource.java:[216,107] incompatible types: net.imglib2.RandomAccessibleInterval<net.imglib2.Volatile<T>> cannot be converted to net.imglib2.RandomAccessibleInterval<V>
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.718 s
[INFO] Finished at: 2017-11-14T11:23:20-05:00
[INFO] Final Memory: 32M/302M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile (default-compile) on project bigcat: Compilation failure
[ERROR] /home/hanslovskyp/workspace/bigcat-future/bigcat/src/main/java/bdv/bigcat/viewer/atlas/data/DataSource.java:[216,107] incompatible types: net.imglib2.RandomAccessibleInterval<net.imglib2.Volatile<T>> cannot be converted to net.imglib2.RandomAccessibleInterval<V>
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Print help message on -h/--help or when invalid options are passed

It is unclear how to open a cremi data set in BigCAT from the command line without looking at the source code. In case of failure or -h/--help no help message is printed to assist with what command line arguments/parameters to use.

For example:

$ java -jar $PWD/target/bigcat-0.0.4-SNAPSHOT-jar-with-dependencies.jar -i ~/Downloads/sample_B_padded_20160501.hdf
creating default input trigger config
Opening raw from /home/hanslovskyp/Downloads/sample_B_padded_20160501.hdf
Opening canvas from /home/hanslovskyp/Downloads/sample_B_padded_20160501.hdf
Exception in thread "main" java.lang.IllegalArgumentException: dimensions[ 0 ] <= 0
        at net.imglib2.img.cell.CellImgFactory.verifyDimensions(CellImgFactory.java:116)
        at net.imglib2.img.cell.CellImgFactory.createInstance(CellImgFactory.java:205)
        at net.imglib2.img.cell.CellImgFactory.createLongInstance(CellImgFactory.java:177)
        at net.imglib2.img.cell.CellImgFactory.createLongInstance(CellImgFactory.java:62)
        at net.imglib2.type.numeric.integer.LongType.createSuitableNativeImg(LongType.java:81)
        at net.imglib2.img.cell.CellImgFactory.create(CellImgFactory.java:147)
        at bdv.bigcat.BigCat.initCanvas(BigCat.java:204)
        at bdv.bigcat.BigCat.init(BigCat.java:148)
        at bdv.bigcat.BigCat.main(BigCat.java:121)

does not help me in figuring out what parameters to use.

I guessed that I need to add use -l volumes/labels/neuron_ids:

$ java -Xmx16g -jar $PWD/target/bigcat-0.0.4-SNAPSHOT-jar-with-dependencies.jar -i ~/Downloads/sample_B_padded_20160501.hdf -l volumes/labels/neuron_ids
Opening raw from /home/hanslovskyp/Downloads/sample_B_padded_20160501.hdf
Opening canvas from /home/hanslovskyp/Downloads/sample_B_padded_20160501.hdf
Opening labels from /home/hanslovskyp/Downloads/sample_B_padded_20160501.hdf
Exception in thread "main" java.lang.IllegalArgumentException: invalid range properties
        at javax.swing.DefaultBoundedRangeModel.<init>(DefaultBoundedRangeModel.java:102)
        at javax.swing.JSlider.<init>(JSlider.java:274)
        at bdv.viewer.ViewerPanel.<init>(ViewerPanel.java:302)
        at bdv.viewer.ViewerFrame.<init>(ViewerFrame.java:94)
        at bdv.BigDataViewer.<init>(BigDataViewer.java:339)
        at bdv.bigcat.ui.Util.createViewer(Util.java:225)
        at bdv.bigcat.BigCat.setupBdv(BigCat.java:309)
        at bdv.bigcat.BigCat.main(BigCat.java:122)

Some progress was made, the error looks different now, but still not there, maybe '-r volumes/raw

java -Xmx16g -jar $PWD/target/bigcat-0.0.4-SNAPSHOT-jar-with-dependencies.jar -i ~/Downloads/sample_B_padded_20160501.hdf -l volumes/labels/neuron_ids -r volumes/raw
creating default input trigger config
Opening raw from /home/hanslovskyp/Downloads/sample_B_padded_20160501.hdf
Opening canvas from /home/hanslovskyp/Downloads/sample_B_padded_20160501.hdf
Opening labels from /home/hanslovskyp/Downloads/sample_B_padded_20160501.hdf
AnnotationsHdf5Store: detected file format 0.2

This works now but a sanity check of the inputs and/or a --help/-h message would have sped up the process significantly.

Remove crosshair to make pictures of 2d planes

There is a faded crosshair even when the panel is not in focus. Make prints with the crosshair is not that good. So, would be nice to be able to choose if the crosshair must be there or not, or have a shortcut to get a picture without the crosshair.

Select visible orthoslice on 3d

Sometimes, we would like to make a picture of the mesh with the orthoslice behind, but now, the only option is with all the 3 sections visible, and this can hide parts of what we want to show. The idea then is to be able to select which orthoslice will be visible.

Possible deadlock

BigCat gets stuck before even showing the UI (happens randomly). The thread dump of the jvm process shows that the main UI thread (AWT-EventQueue-0) is blocked:

"AWT-EventQueue-0" #13 prio=6 os_prio=0 tid=0x00007f5244603800 nid=0x117d waiting for monitor entry [0x00007f51ba515000]
   java.lang.Thread.State: BLOCKED (on object monitor)
        at java.awt.Component.invalidate(Component.java:2934)
        - waiting to lock <0x0000000680000e08> (a java.awt.Component$AWTTreeLock)
        at java.awt.Container.invalidate(Container.java:1589)
        at javax.swing.JComponent.revalidate(JComponent.java:4848)
        at javax.swing.plaf.basic.BasicTextUI$RootView.preferenceChanged(BasicTextUI.java:1406)
        at javax.swing.text.View.preferenceChanged(View.java:288)
        at javax.swing.text.PlainView.updateDamage(PlainView.java:566)
        at javax.swing.text.PlainView.insertUpdate(PlainView.java:451)
        at javax.swing.text.FieldView.insertUpdate(FieldView.java:293)
        at javax.swing.plaf.basic.BasicTextUI$RootView.insertUpdate(BasicTextUI.java:1610)
        at javax.swing.plaf.basic.BasicTextUI$UpdateHandler.insertUpdate(BasicTextUI.java:1869)
        at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:201)
        at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:748)
        at javax.swing.text.AbstractDocument.insertString(AbstractDocument.java:707)
        at javax.swing.text.PlainDocument.insertString(PlainDocument.java:130)
        at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:669)
        at javax.swing.text.JTextComponent.setText(JTextComponent.java:1669)
        at javax.swing.JFormattedTextField$AbstractFormatter.install(JFormattedTextField.java:948)
        at javax.swing.text.DefaultFormatter.install(DefaultFormatter.java:125)
        at javax.swing.text.InternationalFormatter.install(InternationalFormatter.java:285)
        at javax.swing.JFormattedTextField.setFormatter(JFormattedTextField.java:464)
        at javax.swing.JFormattedTextField.setValue(JFormattedTextField.java:788)
        at javax.swing.JFormattedTextField.setValue(JFormattedTextField.java:501)
        at javax.swing.JSpinner$DefaultEditor.stateChanged(JSpinner.java:717)
        at bdv.tools.brightness.SliderPanelDouble.updateNumberFormat(SliderPanelDouble.java:209)
        at bdv.tools.brightness.SliderPanelDouble.access$200(SliderPanelDouble.java:54)
        at bdv.tools.brightness.SliderPanelDouble$2.componentResized(SliderPanelDouble.java:118)
        at java.awt.AWTEventMulticaster.componentResized(AWTEventMulticaster.java:160)
        at java.awt.Component.processComponentEvent(Component.java:6359)
        at java.awt.Component.processEvent(Component.java:6313)
        at java.awt.Container.processEvent(Container.java:2238)
        at java.awt.Component.dispatchEventImpl(Component.java:4889)
        at java.awt.Container.dispatchEventImpl(Container.java:2296)
        at java.awt.Component.dispatchEvent(Component.java:4711)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)
        at java.awt.EventQueue.access$500(EventQueue.java:97)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.awt.EventQueue$3.run(EventQueue.java:703)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
        at java.awt.EventQueue$4.run(EventQueue.java:733)
        at java.awt.EventQueue$4.run(EventQueue.java:731)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Most likely there is a piece of code calling the Swing/AWT from non-UI thread somewhere.

Java version: 1.8.0_171

Assign user specified colors to ids

Users should have the option to assign colors to specific ids. User selection should always have precedence over the color provided by the ARGBStream.

Use only one instance of SelectedIds per source

Currently, we have an instance of SelectedIds per source and per mode.This was initially introduced to enforce only one active (selected) id in the merge/split mode. However, having id selection per mode is highly counterintuitive for users. Also, programming logic is much simpler with one SelectedIds per source. I suggest:

  • Use only one instance of SelectedIds.
  • Introduce a new state, e.g. lastClicked that records the fragment id that was last activated (or Label.INVALID if deactivated)
  • use lastClicked to determine which fragment id should be used for merge/split.
  • enable multiple active fragments in merge/split mode (maybe unify with highlights mode).
  • introduce new highlighting mode for lastClicked, e.g. pulsating between INVALID and actual color

Find new name for tool.

This issue is for brainstorming and collecting ideas for and eventually decide on a new name for BigCAT v2.
These are my current ideas:

  • ATLAS -- advanced toolkit for labeling and segmentation
  • (l')art -- (labeling,) annotation and reconstruction tool
  • CART -- collaborative annotation and reconstruction tool
  • CARE -- collaborative annotation and reconstruction environment

My current favoriate is CARE (If you want to reconstruct neurons, better use CARE).

Add blockchain support

To deploy a network of trust that fosters collaborative, consensus-driven annotations, we should use an innovative blockchain driven data backend. This is both to protect the intellectual ownership of original findings and to incentivize multi-annotator collaboration. For a high-profile research project striving to redefine volume annotation, it is imperative to keep up-to-date with disruptive innovations.

Add painting layer

We still do not have a painting layer which was one of the core components of the old BigCAT. Eventually, we want a multi-resolution painter that paints at the appropriate resolution. For a quicl start, add a simple painter for the highest resolution only.

H5 opener must default to meaningful chunk-size for unchunked datasets

#32

introduces behavior that will render BigCAT non-functional in many everyday situations. The dataset chunk-size of an HDF5 dataset is not necessarily meant to support interactive re-slicing, i.e. may have inconvenient dimensions, be too big or too small. HDF5 loaders (unlike N5) do not require loading of blocks aligned to the dataset chunk-size. I suggest the following approach:

  1. get the dataset chunk size
  2. calculate a meaningful default chunk-size using this approach 2c21d12
  3. if the dataset is not chunked, us the meaningful default chunk size
  4. if the dataset is chunked, compare the chunk-size to the meaningful default chunk size
  5. if the difference in any dimension is > 100%, use the meaningful default chunk size
  6. else use the dataset chunk size

BDV keyboard controls for navigation incomplete

I am particularly missing

  • Cursor Up and Cursor Down for zoom in and out (currently they lead to unexpected mode changes)
  • "," and "." (<,>) to advance and retract through sections
  • "I" to switch interpolation of the currently active source

Dataset Opener

Add UI opener to allow to open data sets from the user interface (instead of just programmatically).

Improve thread pool management

Currently, many classes (e.g. painting, marching cubes) handle their own thread pools. This adds unnecessary overhead and book keeping, as those threads would need to be shut down once the application exits, in order for the jvm to shutdown as well. Currently, this book keeping does not happen and, thus, the jvm lives on even when the windows is closed. With a central thread pool that can be accessed by the individual components, this could be dealt with very easily.

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.