fiji / SPIM_Registration

Deprecated, instead check out: https://github.com/preibischLab/multiview-reconstruction & https://github.com/PreibischLab/BigStitcher
GNU General Public License v2.0
23 stars 22 forks source link

NullPointerException on Register Dataset based on InterestPoint #87

Open Xqua opened 8 years ago

Xqua commented 8 years ago

Hi, I'm trying to do some multiview registration on my machine, but I cannot go past the step:

Register Dataset based on InterestPoint

I have my dataset, it works fine on another machine (running on Windows 7), but on my computer it refuses to run. It found interest points well, but now, when I try to run the registration, it crashes everytime with that error:

(Fiji Is Just) ImageJ 2.0.0-rc-43/1.50e; Java 1.8.0_66 [64-bit]; Linux 4.2.0-19-generic; 149MB of 28000MB (<1%)

java.lang.NullPointerException
    at spim.fiji.plugin.interestpointregistration.InterestPointRegistration.register(InterestPointRegistration.java:181)
    at spim.fiji.plugin.Interest_Point_Registration.register(Interest_Point_Registration.java:388)
    at spim.fiji.plugin.Interest_Point_Registration.run(Interest_Point_Registration.java:106)
    at ij.IJ.runUserPlugIn(IJ.java:212)
    at ij.IJ.runPlugIn(IJ.java:176)
    at ij.Executer.runCommand(Executer.java:136)
    at ij.Executer.run(Executer.java:65)
    at java.lang.Thread.run(Thread.java:745)

I am on Ubuntu 15.10.

Thanks !

Xqua commented 8 years ago

Attached XML file (added .txt to bypass GitHub filter) dataset2.xml.txt

And registration data tpId_0_viewSetupId_0.beads.corr.txt tpId_0_viewSetupId_0.beads.ip.txt tpId_0_viewSetupId_1.beads.corr.txt tpId_0_viewSetupId_1.beads.ip.txt tpId_0_viewSetupId_2.beads.corr.txt tpId_0_viewSetupId_2.beads.ip.txt tpId_0_viewSetupId_3.beads.corr.txt tpId_0_viewSetupId_3.beads.ip.txt tpId_0_viewSetupId_4.beads.corr.txt tpId_0_viewSetupId_4.beads.ip.txt tpId_0_viewSetupId_5.beads.corr.txt tpId_0_viewSetupId_5.beads.ip.txt tpId_0_viewSetupId_6.beads.corr.txt tpId_0_viewSetupId_6.beads.ip.txt tpId_0_viewSetupId_7.beads.corr.txt tpId_0_viewSetupId_7.beads.ip.txt

StephanPreibisch commented 8 years ago

Hi, I am not able to register based on the interest points, but I do not get an exception. How do you run the registration, can you make some screenshots maybe?

StephanPreibisch commented 8 years ago

You have a 25-fold anisotropy between xy and z, is this correct?

StephanPreibisch commented 8 years ago

Oh yes, the complete Fiji log window would be great as well to understand when it crashed. Thanks!

Xqua commented 8 years ago

Break down of the process ( which I do on another computer and it works) I'm just writting the non default steps I do

Define Multiview Dataset Type of Data: Zeizz Lightsheet Select my CZI file

Resave> as HDF5

Detect Interest point for registration Process a single channel (the bead channel) select very weak and small and Difference of Mean

Tools> Duplicate Transformation (BTW it would be awesome to be able to use another chanel without that step !) One channel to another channel

Register Dataset based on Interest Points Do not register the bead channel

Null Pointer Exception

Complete log :

Using spimdata version: 0.9-revision
Using spimreconstruction version: 3.0.3
angles selected: 0, 90, 180, 240
channels selected: 561
illuminations selected: 0
Timepoints selected: 0
(Wed Nov 25 17:54:09 EST 2015): Requesting Img from ImgLoader (tp=0, setup=0)
(Wed Nov 25 17:54:09 EST 2015): Downsampling in XY 16x ...
(Wed Nov 25 17:54:09 EST 2015): Using precomputed Multiresolution Images [8x8x1], Remaining downsampling [2x2x1]
(Wed Nov 25 17:54:10 EST 2015): min intensity = 0.0, max intensity = 34183.812
(Wed Nov 25 17:54:10 EST 2015): Computing Difference-of-Mean, diameters = (5, 7, 5, 7, 5, 7)
(Wed Nov 25 17:54:10 EST 2015): Extracting peaks (radius=2, threshold=0.0025)
(Wed Nov 25 17:54:11 EST 2015): Subpixel localization using quadratic n-dimensional fit
(Wed Nov 25 17:54:11 EST 2015): Found 253 peaks.
(Wed Nov 25 17:54:11 EST 2015): Correcting coordinates for downsampling (xy=16x, z=1x) using AffineTransform: 3d-affine: (16.0, 0.0, 0.0, 3.5, 0.0, 16.0, 0.0, 3.5, 0.0, 0.0, 1.0, 0.0)
(Wed Nov 25 17:54:11 EST 2015): Requesting Img from ImgLoader (tp=0, setup=1)
(Wed Nov 25 17:54:11 EST 2015): Downsampling in XY 16x ...
(Wed Nov 25 17:54:11 EST 2015): Using precomputed Multiresolution Images [8x8x1], Remaining downsampling [2x2x1]
(Wed Nov 25 17:54:12 EST 2015): min intensity = 205.75, max intensity = 52963.5
(Wed Nov 25 17:54:12 EST 2015): Computing Difference-of-Mean, diameters = (5, 7, 5, 7, 5, 7)
(Wed Nov 25 17:54:12 EST 2015): Extracting peaks (radius=2, threshold=0.0025)
(Wed Nov 25 17:54:13 EST 2015): Subpixel localization using quadratic n-dimensional fit
(Wed Nov 25 17:54:14 EST 2015): Found 147 peaks.
(Wed Nov 25 17:54:14 EST 2015): Correcting coordinates for downsampling (xy=16x, z=1x) using AffineTransform: 3d-affine: (16.0, 0.0, 0.0, 3.5, 0.0, 16.0, 0.0, 3.5, 0.0, 0.0, 1.0, 0.0)
(Wed Nov 25 17:54:14 EST 2015): Requesting Img from ImgLoader (tp=0, setup=2)
(Wed Nov 25 17:54:14 EST 2015): Downsampling in XY 16x ...
(Wed Nov 25 17:54:14 EST 2015): Using precomputed Multiresolution Images [8x8x1], Remaining downsampling [2x2x1]
(Wed Nov 25 17:54:14 EST 2015): min intensity = 0.0, max intensity = 63487.438
(Wed Nov 25 17:54:14 EST 2015): Computing Difference-of-Mean, diameters = (5, 7, 5, 7, 5, 7)
(Wed Nov 25 17:54:15 EST 2015): Extracting peaks (radius=2, threshold=0.0025)
(Wed Nov 25 17:54:15 EST 2015): Subpixel localization using quadratic n-dimensional fit
(Wed Nov 25 17:54:15 EST 2015): Found 116 peaks.
(Wed Nov 25 17:54:15 EST 2015): Correcting coordinates for downsampling (xy=16x, z=1x) using AffineTransform: 3d-affine: (16.0, 0.0, 0.0, 3.5, 0.0, 16.0, 0.0, 3.5, 0.0, 0.0, 1.0, 0.0)
(Wed Nov 25 17:54:15 EST 2015): Requesting Img from ImgLoader (tp=0, setup=3)
(Wed Nov 25 17:54:15 EST 2015): Downsampling in XY 16x ...
(Wed Nov 25 17:54:15 EST 2015): Using precomputed Multiresolution Images [8x8x1], Remaining downsampling [2x2x1]
(Wed Nov 25 17:54:16 EST 2015): min intensity = 0.0, max intensity = 50079.188
(Wed Nov 25 17:54:16 EST 2015): Computing Difference-of-Mean, diameters = (5, 7, 5, 7, 5, 7)
(Wed Nov 25 17:54:16 EST 2015): Extracting peaks (radius=2, threshold=0.0025)
(Wed Nov 25 17:54:16 EST 2015): Subpixel localization using quadratic n-dimensional fit
(Wed Nov 25 17:54:17 EST 2015): Found 263 peaks.
(Wed Nov 25 17:54:17 EST 2015): Correcting coordinates for downsampling (xy=16x, z=1x) using AffineTransform: 3d-affine: (16.0, 0.0, 0.0, 3.5, 0.0, 16.0, 0.0, 3.5, 0.0, 0.0, 1.0, 0.0)
Opening of files took: 3 sec.
Detecting interest points took: 4 sec.
(Wed Nov 25 17:54:17 EST 2015): Saved xml '/home/lblondel/Documents/Harvard/ExtavourLab/Images/H2B-iRFP drosophila/./dataset2.xml.txt'.
Using spimdata version: 0.9-revision
Using spimreconstruction version: 3.0.3
angles selected: 0, 90, 180, 240
channels selected: 561, 638
illuminations selected: 0
Timepoints selected: 0
Applying chanel 561 >>> 638
Source viewId t=0, ch=561, ill=0, angle=0
Target viewId t=0, ch=638, ill=0, angle=0
Concatenationg model calibration, 3d-affine: (1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 25.50975409387829, 0.0)
Source viewId t=0, ch=561, ill=0, angle=90
Target viewId t=0, ch=638, ill=0, angle=90
Concatenationg model calibration, 3d-affine: (1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 25.50975409387829, 0.0)
Source viewId t=0, ch=561, ill=0, angle=180
Target viewId t=0, ch=638, ill=0, angle=180
Concatenationg model calibration, 3d-affine: (1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 25.50975409387829, 0.0)
Source viewId t=0, ch=561, ill=0, angle=240
Target viewId t=0, ch=638, ill=0, angle=240
Concatenationg model calibration, 3d-affine: (1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 25.50975409387829, 0.0)
(Wed Nov 25 17:56:05 EST 2015): Saved xml '/home/lblondel/Documents/Harvard/ExtavourLab/Images/H2B-iRFP drosophila/./dataset2.xml.txt'.
Using spimdata version: 0.9-revision
Using spimreconstruction version: 3.0.3
angles selected: 0, 90, 180, 240
channels selected: 561, 638
illuminations selected: 0
Timepoints selected: 0
registering channel: 1 label: 'beads'
Registration algorithm: Fast 3d geometric hashing (rotation invariant)
Registration type: TIMEPOINTS_INDIVIDUALLY
Channels to process: 1
Following tiles are fixed:
Angle:0 Channel:638 Illum:0 TimePoint:0
Following tiles are reference tiles (for mapping back if there are no fixed tiles):
(Wed Nov 25 17:56:42 EST 2015): Starting registration
(Wed Nov 25 17:56:42 EST 2015): Finding correspondences for subset: individual timepoint registration: 0(id=0)

Error Message

(Fiji Is Just) ImageJ 2.0.0-rc-43/1.50e; Java 1.8.0_66 [64-bit]; Linux 4.2.0-19-generic; 7756MB of 28000MB (27%)

java.lang.NullPointerException
    at spim.fiji.plugin.interestpointregistration.InterestPointRegistration.register(InterestPointRegistration.java:181)
    at spim.fiji.plugin.Interest_Point_Registration.register(Interest_Point_Registration.java:388)
    at spim.fiji.plugin.Interest_Point_Registration.run(Interest_Point_Registration.java:106)
    at ij.IJ.runUserPlugIn(IJ.java:212)
    at ij.IJ.runPlugIn(IJ.java:176)
    at ij.Executer.runCommand(Executer.java:136)
    at ij.Executer.run(Executer.java:65)
    at java.lang.Thread.run(Thread.java:745)
Xqua commented 8 years ago

I FOUND THE PROBLEM !

whoa that wasn't obvious AT all ... I did not had 3D viewer plugin installed ! You need to add a warning !

StephanPreibisch commented 8 years ago

This is not about the 3D viewer, but java3d, actually only the java.vecmath class. The geometric hashing method requires it. I was not aware that this is not installed by default anymore. It works for me on Mac under Java6, 7 & 8.

@ctrueden should I re-implement that without java3d, what do you think?

ctrueden commented 8 years ago

@StephanPreibisch You can keep using vecmath—but we will be switching to a clean version of Java 3D (versioned at 1.6+), maintained by the JogAmp team. Or for the moment there is a SciJava fork you can use.

The reason it works for you is probably because you have /System/Library/Java/Extensions/vecmath.jar present on your system. But new machines don't, I think. And it won't work on Windows or Linux out of the box, either. You really need to depend on libraries that ship with Fiji.

There are actually quite a few Fiji plugins that use vecmath, which will suffer from this same bug, until we update them to use the new vecmath.

StephanPreibisch commented 8 years ago

@ctrueden Thanks, do you have a feeling for when you would be able to do that? For me, it does break a major component of the registration and it would not be too much effort to change it - I hope ;)

ctrueden commented 8 years ago

We already switched, on the 3D update site. We cannot switch Fiji core until we fully update to Java 8. See: