Coder Social home page Coder Social logo

bigwarp's Introduction

bigwarp

Build Status

A tool for manual pointwise deformable registration using bigdataviewer.

If you are using this tool in your work, please do not forget to cite John Bogovic's paper where he first introduces BigWarp:

JA Bogovic, P Hanslovsky, A Wong, S Saalfeld, "Robust registration of calcium images by learned contrast synthesis", In Biomedical Imaging (ISBI), 2016 IEEE 13th International Symposium on, 1123-1126, DOI: 10.1109/ISBI.2016.7493463.

See the main bigwarp page for details.

bigwarp's People

Contributors

axtimwalde avatar bogovicj avatar cmhulbert avatar ctrueden avatar hanslovsky avatar hinerm avatar nicokiaru avatar nthistle avatar tischi avatar tpietzsch avatar

Stargazers

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

Watchers

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

bigwarp's Issues

Problem opening multichannel images

java.lang.ArrayIndexOutOfBoundsException: 2
	at bigwarp.BigWarpInit.wrapSourcesAsRenamable(BigWarpInit.java:276)
	at bigwarp.BigWarpInit.createBigWarpData(BigWarpInit.java:257)
	at bigwarp.BigWarpInit.createBigWarpData(BigWarpInit.java:346)
	at bigwarp.BigWarpInit.createBigWarpDataFromImages(BigWarpInit.java:408)
	at bdv.ij.BigWarpImagePlusPlugIn.run(BigWarpImagePlusPlugIn.java:79)
	at ij.IJ.runUserPlugIn(IJ.java:217)
	at ij.IJ.runPlugIn(IJ.java:181)
	at ij.Executer.runCommand(Executer.java:137)
	at ij.Executer.run(Executer.java:66)
	at java.lang.Thread.run(Thread.java:745)

PainterThread exception when closing bigwarp

"I got an error message after closing the viewer. Before closing, I deleted two entries in the landmarks table without exporting." -Ala

Exception in thread "PainterThread" java.util.NoSuchElementException
    at java.util.ArrayDeque.removeFirst(ArrayDeque.java:280)
    at java.util.ArrayDeque.pop(ArrayDeque.java:517)
    at bdv.viewer.render.MultiResolutionRenderer.paint(MultiResolutionRenderer.java:520)
    at bdv.viewer.ViewerPanel.paint(ViewerPanel.java:416)
    at bdv.viewer.BigWarpViewerPanel.paint(BigWarpViewerPanel.java:201)
    at net.imglib2.ui.PainterThread.run(PainterThread.java:86)

Add undo/redo capability

This is important because:

  1. "trying out" changes would be easier and less damaging
  2. Accidental edits are always possible, and should not be a cause of undue stress.

Avoid System.exit calls

I just had a look at BigWarp, it seems to be a great plugin! Still have to get used to the navigation though.
I noticed that when you close the landmarks list window, the whole JVM will be shut down, due to calls to System.exit. That way, users will loose all unsaved changes in images and scripts opened in Fiji. It might be enough to just dispose of the JFrame and leave the current Fiji/ImageJ instance untouched.

UI Improvements

Hi @bogovicj!

Finally had a chance to actually play around with BigWarp. Really impressive! I am just opening this to mention a couple of things I noticed while using the UI (on a fresh Fiji installation). Nothing major, nor critical.

  • It would be really useful to have an option in the UI to directly save the warped image without having to display it in IJ
  • Once exported, warped image seems to loose spatial calibration. Also, on the datasets I tried [8-bit single channel Z-stacks (IJ1 TIFF files)] the Z dimension was swapped with C after export.
  • Currently, the title of exported image is a constant string. It would be nice to name the exported image after the input choice. Same for proposed filename when saving landmark files.
  • When editing the Landmarks table, I was able to delete all landmarks but never the first (Pt-0 in first row). But it could be I missed something...

I could probably look into this, but not immediately though.

Output deformation field

Would it be possible to output the deformation field as well?

It would be good if this feature were made to be an option because the deformation field for the full resolution volumes will be huge. The deformation field could be output as three separate (for x, y, and z displacements) 32-bit ImagePluss or a single 32-bit multichannel ImagePlus.

Rendering improvements

Per conversation with @davidhildebrand,

  • Have script with user spec'd FOV (instead of needing a target image) (1bb5234)
  • Parallelize (c6b5411)
  • Read target image header only in script (b19c37c)

Need to test more before merging to master.
Now merged in master, closing the issue.

Right-click does not work in landmark list

When right-clicking on a landmark in the landmarks list, the expected result is a context menu that gives the possibility of e.g. deleting the landmark in question. However, on Windows, this feature is not available. Right-clicking produces no result at all. Control+left click does not do anything either. Neither does any of the other modifier buttonsa. Selecting a landmark and clicking on the "context menu" button, that some keyboards have, also doesn't do anything. This is with the latest version of BigWarp in FIJI (Not the one shipping with bigdataviewer which is buggy, the latest, 3.1.2)

How to use standalone version

Hi! I'm trying the exe version of bigwarp that you provide on conda, but not doing well. How do I pass arguments to that? I will appreciate it if you could give me some example. Thank you for your advice.

(I'm very new to Github and poor at English. I'm sorry If it's inappropriate to ask here.)

NullPointer when <ctrl>-D

To reproduce:
Add an unpaired landmark in either window. Press -D

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
	at bigwarp.BigWarp.warpToLandmark(BigWarp.java:1482)
	at bigwarp.BigWarpActions$WarpToNextAction.actionPerformed(BigWarpActions.java:925)
	at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1668)
...

Setup id bug when loading virtual stack

To reproduce -

  • Open one virtual stack.
  • Try to run bigwarp

Observe this error message:

java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
	at java.util.ArrayList.rangeCheck(ArrayList.java:657)
	at java.util.ArrayList.get(ArrayList.java:433)
	at bdv.img.virtualstack.VirtualStackImageLoader.getSetupImgLoader(VirtualStackImageLoader.java:179)
	at bdv.img.virtualstack.VirtualStackImageLoader$3.getSetupImgLoader(VirtualStackImageLoader.java:106)
	at bdv.BigDataViewer.initSetups(BigDataViewer.java:291)
	at bigwarp.BigWarpInit.initSetups(BigWarpInit.java:210)
	at bigwarp.BigWarpInit.createBigWarpData(BigWarpInit.java:246)
	at bigwarp.BigWarpInit.createBigWarpData(BigWarpInit.java:344)
	at bigwarp.BigWarpInit.createBigWarpDataFromImages(BigWarpInit.java:407)
	at bdv.ij.BigWarpImagePlusPlugIn.run(BigWarpImagePlusPlugIn.java:82)
	at ij.IJ.runUserPlugIn(IJ.java:228)
	at ij.IJ.runPlugIn(IJ.java:192)
	at ij.Executer.runCommand(Executer.java:137)
	at ij.Executer.run(Executer.java:66)
	at java.lang.Thread.run(Thread.java:748)

To fix ( I think ):
need to make sure that VirtualStackImageLoaders have the correct setup id's
here.

NoSuchMethodError upon start of BigWarp

When trying to run BigWarp in an up-to-date Fiji installation using two 16-bit stacks of same size, I get the following exception:

java.lang.NoSuchMethodException: Could not find method bdv.tools.brightness.SetupAssignments.<init>(Ljava/util/ArrayList;II)V
There was a problem with the class bdv.tools.brightness.SetupAssignments which can be found here:
/C:/UTILIT~1/Fiji.app/jars/bigdataviewer-core-2.5.1.jar
java.lang.NoSuchMethodError: bdv.tools.brightness.SetupAssignments.<init>(Ljava/util/ArrayList;II)V
	at bigwarp.BigWarp.<init>(BigWarp.java:433)
	at bdv.ij.BigWarpImagePlusPlugIn.run(BigWarpImagePlusPlugIn.java:79)
	at ij.IJ.runUserPlugIn(IJ.java:217)
	at ij.IJ.runPlugIn(IJ.java:181)
	at ij.Executer.runCommand(Executer.java:137)
	at ij.Executer.run(Executer.java:66)
	at java.lang.Thread.run(Thread.java:745)

	at bigwarp.BigWarp.<init>(BigWarp.java:433)
	at bdv.ij.BigWarpImagePlusPlugIn.run(BigWarpImagePlusPlugIn.java:79)
	at ij.IJ.runUserPlugIn(IJ.java:217)
	at ij.IJ.runPlugIn(IJ.java:181)
	at ij.Executer.runCommand(Executer.java:137)
	at ij.Executer.run(Executer.java:66)
	at java.lang.Thread.run(Thread.java:745)

(Just to be sure: I'm using bigwarp_fiji-2.1.2.jar and bigdataviewer-core-2.5.1.jar, both served from the Java-8 update site.)

Any ideas?

Not all export features work

Are these parameter settings working?

  • Exporting virtual is offset relative to truth

(FOV,RES)

  • TGT,TGT
  • TGT,MVG
  • TGT,SPC
  • MVG,TGT
  • MVG,MVG
  • MVG,SPC
  • LMK,TGT
  • LMK,MVG
  • LMK,SPK

Adding "fixed point" before transform throws exception

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at jitk.spline.ThinPlateR2LogRSplineKernelTransform.initialGuessAtInverse(ThinPlateR2LogRSplineKernelTransform.java:813)
at bigwarp.landmarks.LandmarkTableModel.computeWarpedPoint(LandmarkTableModel.java:723)
at bigwarp.landmarks.LandmarkTableModel.pointEdit(LandmarkTableModel.java:665)
at bigwarp.landmarks.LandmarkTableModel.pointEdit(LandmarkTableModel.java:562)
at bigwarp.landmarks.LandmarkTableModel.pointEdit(LandmarkTableModel.java:557)
at bigwarp.BigWarp.addPoint(BigWarp.java:1139)
at bigwarp.BigWarp.addPoint(BigWarp.java:1124)
at bigwarp.BigWarp$MouseLandmarkListener.addFixedPoint(BigWarp.java:2284)
at bigwarp.BigWarp$MouseLandmarkListener.mouseReleased(BigWarp.java:2176)

ArrayIndexOutOfBounds error caused by BigWarpOverlay

Seems to be caused when loading a new set of landmarks, when the landmark table is already populated.

Originates from this code segment:

        // get selected points
        int[] selectedRows = table.getSelectedRows();
        Arrays.sort( selectedRows );
        boolean[] isSelected = new boolean[ landmarkModel.getRowCount() ];
        for( int i : selectedRows )
            isSelected[ i ] = true;

Affine only transformation

@bogovicj I think it would be useful to have the option to see the affine only transformation. It might also be useful to see the rigid and similarity transformations as well.

Move to landmark after adding to the moving viewer

When placing a landmark while the moving volume is in transformed mode, once the moving location for a landmark is placed in the moving viewer, the volume transforms immediately but the viewer does not move to keep the landmark location in viewer. This can be disorienting when one wants to place multiple landmarks around a structure, because the landmark location is no longer in view (instead some likely unrelated location in the newly transformed volume).

CC @acardona

Landmark point loading exception

To produce: have the table hold a large number of landmarks, load a file with a small number of landmarks:

Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 33
	at bdv.viewer.BigWarpOverlay.paint(BigWarpOverlay.java:85)
	at bdv.viewer.BigWarpViewerPanel.drawOverlays(BigWarpViewerPanel.java:277)
	at net.imglib2.ui.InteractiveDisplayCanvasComponent.paintComponent(InteractiveDisplayCanvasComponent.java:272)
	at javax.swing.JComponent.paint(JComponent.java:1056)
	at javax.swing.JComponent.paintChildren(JComponent.java:889)
	at javax.swing.JComponent.paint(JComponent.java:1065)
	at javax.swing.JComponent.paintToOffscreen(JComponent.java:5210)
	at javax.swing.BufferStrategyPaintManager.paint(BufferStrategyPaintManager.java:290)
...

Jenkins complaining

http://jenkins.imagej.net/job/bigwarp/42/changes

I have no idea what's wrong, locally, everything builds perfectly fine

mvn -Dimagej.app.directory=/home/saalfeld/packages/Fiji.app/ clean install
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.586 s
[INFO] Finished at: 2016-03-03T17:34:41+01:00
[INFO] Final Memory: 39M/425M
[INFO] ------------------------------------------------------------------------

Bug when placing moving landmark in target viewer

When placing a target and a moving landmark in the target viewer with SPACE + click and then SHIFT + click, sometimes instead one ends up with two landmarks, named the same, one with the target location set (and the moving infinity) and one with the moving location set (and the target infinity). The expected behavior is that the SHIFT + click would fill in the moving location for the first row, just as if one had clicked in the moving viewer.

Output jacobian determinant field

May be worth it to also enable generating the jacobian (tensor) field as output since it is required to get the jacobian determinant.

array out of bounds during landmark placement

WARNING:
Opening dataset that is not suited for interactive browsing.
Consider resaving as HDF5 for better performance.
WARNING:
Opening dataset that is not suited for interactive browsing.
Consider resaving as HDF5 for better performance.
Exception in thread "Thread-5" java.lang.ArrayIndexOutOfBoundsException: -1
at jitk.spline.ThinPlateR2LogRSplineKernelTransform.initialGuessAtInverse(ThinPlateR2LogRSplineKernelTransform.java:825)
at jitk.spline.ThinPlateR2LogRSplineKernelTransform.inverse(ThinPlateR2LogRSplineKernelTransform.java:917)
at bigwarp.landmarks.LandmarkTableModel.computeWarpedPoint(LandmarkTableModel.java:745)
at bigwarp.landmarks.LandmarkTableModel.updateAllWarpedPoints(LandmarkTableModel.java:716)
at bigwarp.BigWarp$SolveThread.run(BigWarp.java:2733)
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: -1
at jitk.spline.ThinPlateR2LogRSplineKernelTransform.initialGuessAtInverse(ThinPlateR2LogRSplineKernelTransform.java:825)
at jitk.spline.ThinPlateR2LogRSplineKernelTransform.inverse(ThinPlateR2LogRSplineKernelTransform.java:917)
at bigwarp.landmarks.LandmarkTableModel.computeWarpedPoint(LandmarkTableModel.java:745)
at bigwarp.landmarks.LandmarkTableModel.pointEdit(LandmarkTableModel.java:687)
at bigwarp.landmarks.LandmarkTableModel.pointEdit(LandmarkTableModel.java:583)
at bigwarp.landmarks.LandmarkTableModel.pointEdit(LandmarkTableModel.java:578)
at bigwarp.BigWarp.addPoint(BigWarp.java:1223)
at bigwarp.BigWarp$MouseLandmarkListener.mouseReleased(BigWarp.java:2392)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
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:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
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:74)
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)
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: -1
at jitk.spline.ThinPlateR2LogRSplineKernelTransform.initialGuessAtInverse(ThinPlateR2LogRSplineKernelTransform.java:825)
at jitk.spline.ThinPlateR2LogRSplineKernelTransform.inverse(ThinPlateR2LogRSplineKernelTransform.java:917)
at bigwarp.landmarks.LandmarkTableModel.computeWarpedPoint(LandmarkTableModel.java:745)
at bigwarp.landmarks.LandmarkTableModel.pointEdit(LandmarkTableModel.java:687)
at bigwarp.landmarks.LandmarkTableModel.pointEdit(LandmarkTableModel.java:583)
at bigwarp.landmarks.LandmarkTableModel.pointEdit(LandmarkTableModel.java:578)
at bigwarp.BigWarp.addPoint(BigWarp.java:1223)
at bigwarp.BigWarp$MouseLandmarkListener.mouseReleased(BigWarp.java:2392)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
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:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
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:74)
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)
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: -1
at jitk.spline.ThinPlateR2LogRSplineKernelTransform.initialGuessAtInverse(ThinPlateR2LogRSplineKernelTransform.java:825)
at jitk.spline.ThinPlateR2LogRSplineKernelTransform.inverse(ThinPlateR2LogRSplineKernelTransform.java:917)
at bigwarp.landmarks.LandmarkTableModel.computeWarpedPoint(LandmarkTableModel.java:745)
at bigwarp.landmarks.LandmarkTableModel.pointEdit(LandmarkTableModel.java:687)
at bigwarp.landmarks.LandmarkTableModel.pointEdit(LandmarkTableModel.java:583)
at bigwarp.landmarks.LandmarkTableModel.pointEdit(LandmarkTableModel.java:578)
at bigwarp.BigWarp.addPoint(BigWarp.java:1223)
at bigwarp.BigWarp$MouseLandmarkListener.mouseReleased(BigWarp.java:2392)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
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:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
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:74)
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)
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: -1
at jitk.spline.ThinPlateR2LogRSplineKernelTransform.initialGuessAtInverse(ThinPlateR2LogRSplineKernelTransform.java:825)
at jitk.spline.ThinPlateR2LogRSplineKernelTransform.inverse(ThinPlateR2LogRSplineKernelTransform.java:917)
at bigwarp.landmarks.LandmarkTableModel.computeWarpedPoint(LandmarkTableModel.java:745)
at bigwarp.landmarks.LandmarkTableModel.pointEdit(LandmarkTableModel.java:687)
at bigwarp.landmarks.LandmarkTableModel.pointEdit(LandmarkTableModel.java:583)
at bigwarp.landmarks.LandmarkTableModel.pointEdit(LandmarkTableModel.java:578)
at bigwarp.BigWarp.addPoint(BigWarp.java:1223)
at bigwarp.BigWarp$MouseLandmarkListener.mouseReleased(BigWarp.java:2392)
at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:290)
at java.awt.Component.processMouseEvent(Component.java:6539)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
at java.awt.Component.processEvent(Component.java:6304)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4889)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4711)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
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:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
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:74)
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)

Using Big Warp ImageJ plugin for image registration

I am trying to register two stacks of images. Both acquired by a two-photon microscope. The first is for a living hippocampal culture slice and the second is for the same slice after fixation. The fixation results in some distortions in the slice. Therefore, I used Big Warp to register the two images but I didn't know how to start the warping and registration after selecting the landmarks in the two images.
I think this plugin can solve my problem by I am not applying it correctly.
Could anyone explain how can I proceed with registration after selecting the landmarks in the two images?

Thanks

throws exception when transforming 2d images

To cause exception:

  1. Open 2d images with big warp
  2. Place landmarks
  3. Press 'T' to warp moving image
java.lang.ArrayIndexOutOfBoundsException: 2
	at net.imglib2.RealPoint.setPosition(RealPoint.java:250)
	at net.imglib2.realtransform.AffineTransform3D.apply(AffineTransform3D.java:416)
	at net.imglib2.realtransform.RealTransformRandomAccessible$RealTransformRandomAccess.apply(RealTransformRandomAccessible.java:93)
	at net.imglib2.realtransform.AffineRandomAccessible$AffineRandomAccess.<init>(AffineRandomAccessible.java:73)
	at net.imglib2.realtransform.AffineRandomAccessible.randomAccess(AffineRandomAccessible.java:204)
	at net.imglib2.realtransform.AffineRandomAccessible.randomAccess(AffineRandomAccessible.java:214)
	at net.imglib2.realtransform.AffineRandomAccessible.randomAccess(AffineRandomAccessible.java:58)
	at net.imglib2.ui.SimpleInterruptibleProjector$1.run(SimpleInterruptibleProjector.java:154)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)

Row selection in table should matter, possibly enable both viewers to edit both moving and target points.

Adding to unpaired points

Proposal A

  • If a row is selected in table AND has a missing value, add the clicked point to the selected row,
    • then move selection to next (wrapping, if necessary) unpaired point if it exists. If no unpaired point exists then no row is selected.
    • Note: the moving viewer adds moving points only, the target viewer adds target points only

Proposal B - worse alternative ( imo )

  • If we decide that both viewers should be able to add both moving and target points when unpaired, then adding multiple new points would be annoying:
    • Click moving viewer adds new moving point i ( row i selected )
    • Hit escape to deselect row (otherwise, clicking again would use the moving viewer to add a target point)

Changing paired points

  • If we decide to implement this behavior, the we need a way of deselecting rows; otherwise, adding new points will be impossible (Esc key would be good for this).
    • Furthermore, it would probably be best to deselect all rows if there are no unpaired points, so that the next click adds a new unpaired landmark.
  • Perhaps we should consider adding some hotkeys related to point selection as well.

Proposal 1

  • If a row is selected in the table and is paired, then
    • if the moving viewer is clicked, the moving point of the selected row changes
    • if the target viewer is clicked, the target point of the selected row changes
  • Also probably a good idea to have a message on screen as an indicator.
    • Something like "About to edit point . Esc to exit."

Proposal 2

  • @axtimwalde, Should we differentiate between selected cells vs selected rows in addition to checking which viewer was clicked? specifically:
    • If a column corresponding to a moving point is selected, then the moving point is updated
    • If a column corresponding to a target point is selected, then the target point is updated
    • Otherwise ( if the name column is selected, e.g.) then the viewer is used to determine which is updated.

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.