PreibischLab / multiview-reconstruction

Software for the reconstruction of multi-view microscopic acquisitions like Selective Plane Illumination Microscopy (SPIM) Data
GNU General Public License v2.0
23 stars 22 forks source link

Error IndexOutOfBound on new registration #11

Open Xqua opened 6 years ago

Xqua commented 6 years ago

Hi since the new version that detects tiles I'm running into this issue when I want to register the dataset:

The problem is that I have no tiles in my dataset to start with.

Using spimdata version: 0.9-revision
Using spimreconstruction version: 0.2.7
angles selected: 0, 1, 2, 3
channels selected: 0
illuminations selected: 0
tiles selected: 0, 1, 2, 3
Timepoints selected: 0
Registration algorithm: Fast descriptor-based (rotation invariant)
Registration type: TIMEPOINTS_INDIVIDUALLY
Selected Paramters:
model: 2
redundancy: 0
ratioOfDistance: 10.0
maxEpsilon: 5.0
ransacIterations: 10000
minInlierRatio: 0.1
Identified: 4 groups when grouping by tile.
tile-Group 0:0-3
tile-Group 1:0-1
tile-Group 2:0-2
tile-Group 3:0-0
Defined pairs, removed 0 redundant view pairs.
Removed 6 pairs because they do not overlap (Strategy='SimpleBoundingBoxOverlap')
(Fiji Is Just) ImageJ 2.0.0-rc-68/1.52e; Java 1.8.0_171 [64-bit]; Linux 4.4.0-128-generic; 195MB of 28000MB (<1%)

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.rangeCheck(ArrayList.java:657)
    at java.util.ArrayList.get(ArrayList.java:433)
    at net.preibisch.mvrecon.process.interestpointregistration.pairwise.constellation.PairwiseSetup$2.compare(PairwiseSetup.java:563)
    at net.preibisch.mvrecon.process.interestpointregistration.pairwise.constellation.PairwiseSetup$2.compare(PairwiseSetup.java:559)
    at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355)
    at java.util.TimSort.sort(TimSort.java:220)
    at java.util.Arrays.sort(Arrays.java:1512)
    at java.util.ArrayList.sort(ArrayList.java:1462)
    at java.util.Collections.sort(Collections.java:175)
    at net.preibisch.mvrecon.process.interestpointregistration.pairwise.constellation.PairwiseSetup.sortSets(PairwiseSetup.java:567)
    at net.preibisch.mvrecon.process.interestpointregistration.pairwise.constellation.PairwiseSetup.sortSubsets(PairwiseSetup.java:132)
    at net.preibisch.mvrecon.fiji.plugin.Interest_Point_Registration.identifySubsets(Interest_Point_Registration.java:471)
    at net.preibisch.mvrecon.fiji.plugin.Interest_Point_Registration.register(Interest_Point_Registration.java:220)
    at net.preibisch.mvrecon.fiji.plugin.Interest_Point_Registration.register(Interest_Point_Registration.java:178)
    at net.preibisch.mvrecon.fiji.plugin.Interest_Point_Registration.run(Interest_Point_Registration.java:147)
    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)
hoerldavid commented 6 years ago

Hi @Xqua,

I assume the problem is related to the tiles we introduced with BigStitcher. Since we automatically move Views in x,y,z according to their metadata (to have a good pre-alignment with tiled images), your Angles are probably moved in a way that they don't overlap (and the registration will ignore non-overlapping images). I can reproduce the same problem in a test dataset I have lying around (BigDataViewer screenshot):

screen shot 2018-07-13 at 19 15 30

We are actively working on fixing this issue (e.g. 996411f3dafd5b9f76401fe724f0ef0369f78bfd), so I hope the problem will be gone with the next update in Fiji.

In the meantime, you should be able to fix this by selecting Registration in between views: Compare all views against each other (instead of Only overlapping views as shown below) Basic Registration Parameters dialog.

I hope that you should then be able to register the images.

If that does not help, as a last resort, you can uninstall BigStitcher to downgrade to the previous version of MVR ( 😢 ).

Best, David

Xqua commented 6 years ago

Thanks for the info ! I understand what's happening now :D

Couldn't make it work even by asking it map each to each ...

went back to the pre MVR version and it's working like a charm !

Happy to provide you with a CZI for debugging if you ever need one !

hoerldavid commented 6 years ago

Hi @Xqua,

Another solution (if you do not want to downgrade ;) ) would be to remove the metadata translation from the view registrations. Depending on whether you used the Z.1 Loader or the AutoLoader, you could do the following:

Then, the MVR should work like in the old version (but with the various tweaks and optimizations we introduced since then).

I'll try to reproduce the error you got on the dataset I have lying around (I should be pretty much the same as yours, a simple, multi-angle czi with one image per angle). If it's easy for you to provide your file, I can have a look as well, thanks for the offer!

Best, David