.
21 | * #L%
22 | */
23 | package net.preibisch.legacy.mpicbg;
24 |
25 | import mpicbg.models.Point;
26 | import mpicbg.models.PointMatch;
27 |
28 | public class PointMatchGeneric extends PointMatch
29 | {
30 | private static final long serialVersionUID = 1L;
31 |
32 | public PointMatchGeneric( P p1, P p2, double[] weights, double strength )
33 | {
34 | super( p1, p2, weights, strength );
35 | }
36 |
37 | public PointMatchGeneric( P p1, P p2, double[] weights )
38 | {
39 | super( p1, p2, weights );
40 | }
41 |
42 | public PointMatchGeneric( P p1, P p2, double weight )
43 | {
44 | super( p1, p2, weight );
45 | }
46 |
47 | public PointMatchGeneric( P p1, P p2, double weight, double strength )
48 | {
49 | super( p1, p2, weight, strength );
50 | }
51 |
52 | public PointMatchGeneric( P p1, P p2 )
53 | {
54 | super( p1, p2 );
55 | }
56 |
57 | final public P getPoint1() { return (P)getP1(); }
58 |
59 | final public P getPoint2() { return (P)getP2(); }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/process/fusion/intensity/mpicbg/PointMatch1D.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.process.fusion.intensity.mpicbg;
24 |
25 | import mpicbg.models.CoordinateTransform;
26 | import mpicbg.models.PointMatch;
27 |
28 | /**
29 | * A match of two 1D points. This is used in the intensity matching algorithm and adds an optimized method for computing
30 | * the distance of two 1D points.
31 | */
32 | public class PointMatch1D extends PointMatch {
33 | public PointMatch1D(final Point1D p1, final Point1D p2) {
34 | super(p1, p2);
35 | }
36 |
37 | public PointMatch1D(final Point1D p1, final Point1D p2, final double weight) {
38 | super(p1, p2, weight);
39 | }
40 |
41 | @Override
42 | public void apply(final CoordinateTransform t) {
43 | final Point1D p1 = (Point1D) this.p1;
44 | p1.applyFast(t);
45 | }
46 |
47 | @Override
48 | public double getDistance(){
49 | final Point1D p1 = (Point1D) this.p1;
50 | final Point1D p2 = (Point1D) this.p2;
51 | return Math.abs(p1.getW()[0] - p2.getW()[0]);
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/process/interestpointregistration/pairwise/constellation/AllToAll.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.process.interestpointregistration.pairwise.constellation;
24 |
25 | import java.util.Collection;
26 | import java.util.List;
27 | import java.util.Set;
28 |
29 | import net.imglib2.util.Pair;
30 | import net.preibisch.mvrecon.process.interestpointregistration.pairwise.constellation.grouping.Group;
31 | import net.preibisch.mvrecon.process.interestpointregistration.pairwise.constellation.range.AllInRange;
32 |
33 | public class AllToAll< V extends Comparable< V > > extends AllToAllRange< V, AllInRange< V > >
34 | {
35 | public AllToAll(
36 | final List< V > views,
37 | final Set< Group< V > > groups )
38 | {
39 | super( views, groups, new AllInRange<>() );
40 | }
41 |
42 | public static < V > List< Pair< V, V > > allPairs(
43 | final List< ? extends V > views,
44 | final Collection< ? extends Group< V > > groups )
45 | {
46 | return AllToAllRange.allPairs( views, groups, new AllInRange<>() );
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/AbstractTransformedImgRandomAccessible.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.process.fusion.transformed;
24 |
25 | import net.imglib2.Interval;
26 | import net.imglib2.RandomAccessibleInterval;
27 | import net.imglib2.type.numeric.RealType;
28 | import net.imglib2.type.numeric.real.FloatType;
29 |
30 | public abstract class AbstractTransformedImgRandomAccessible< T extends RealType< T > > extends AbstractTransformedIntervalRandomAccessible
31 | {
32 | final protected RandomAccessibleInterval< T > img;
33 |
34 | final protected boolean hasMinValue;
35 | final protected float minValue;
36 |
37 | public AbstractTransformedImgRandomAccessible(
38 | final RandomAccessibleInterval< T > img, // from ImgLoader
39 | final boolean hasMinValue,
40 | final float minValue,
41 | final FloatType outsideValue,
42 | final Interval boundingBox )
43 | {
44 | super( img, outsideValue, boundingBox );
45 |
46 | this.img = img;
47 | this.hasMinValue = hasMinValue;
48 | this.minValue = minValue;
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/fiji/spimdata/explorer/SimpleInfoBox.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.fiji.spimdata.explorer;
24 |
25 | import java.awt.BorderLayout;
26 | import java.awt.Dimension;
27 |
28 | import javax.swing.JFrame;
29 | import javax.swing.JPanel;
30 | import javax.swing.JScrollPane;
31 | import javax.swing.JTextArea;
32 |
33 | public class SimpleInfoBox
34 | {
35 | final JFrame frame;
36 |
37 | public SimpleInfoBox( final String title, final String text )
38 | {
39 | frame = new JFrame( title );
40 |
41 | final JTextArea textarea = new JTextArea( text );
42 |
43 | final JPanel panel = new JPanel();
44 | panel.add( textarea, BorderLayout.CENTER );
45 | final JScrollPane pane = new JScrollPane( panel );
46 | frame.add( pane, BorderLayout.CENTER );
47 |
48 | frame.pack();
49 |
50 | final Dimension d = pane.getSize();
51 | d.setSize( d.width + 20, d.height + 10 );
52 | pane.setSize( d );
53 | pane.setPreferredSize( d );
54 | frame.setPreferredSize( d );
55 |
56 | frame.pack();
57 | frame.setVisible( true );
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/process/cuda/CUDAStandardFunctions.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.process.cuda;
24 |
25 | import com.sun.jna.Library;
26 |
27 | public interface CUDAStandardFunctions extends Library
28 | {
29 | /*
30 | __declspec(dllexport) int getCUDAcomputeCapabilityMinorVersion(int devCUDA);
31 | __declspec(dllexport) int getCUDAcomputeCapabilityMajorVersion(int devCUDA);
32 | __declspec(dllexport) int getNumDevicesCUDA();
33 | __declspec(dllexport) char* getNameDeviceCUDA(int devCUDA);
34 | __declspec(dllexport) long long int getMemDeviceCUDA(int devCUDA);
35 | long long int getFreeMemDeviceCUDA(int devCUDA)
36 | */
37 | public int getCUDAcomputeCapabilityMinorVersion(int devCUDA);
38 | public int getCUDAcomputeCapabilityMajorVersion(int devCUDA);
39 | /**
40 | * @return -1 if driver crashed, otherwise the number of CUDA devices, <= 0
41 | */
42 | public int getNumDevicesCUDA();
43 | public void getNameDeviceCUDA(int devCUDA, byte[] name);
44 | public long getMemDeviceCUDA(int devCUDA);
45 | public long getFreeMemDeviceCUDA(int devCUDA);
46 | }
47 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weightcombination/CombineWeightsMulRandomAccess.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.process.fusion.transformed.weightcombination;
24 |
25 | import java.util.List;
26 |
27 | import net.imglib2.RandomAccessible;
28 | import net.imglib2.type.numeric.real.FloatType;
29 |
30 | public class CombineWeightsMulRandomAccess extends CombineWeightsRandomAccess
31 | {
32 | public CombineWeightsMulRandomAccess(
33 | final int n,
34 | final List< ? extends RandomAccessible< FloatType > > weights )
35 | {
36 | super( n, weights );
37 | }
38 |
39 | @Override
40 | public FloatType get()
41 | {
42 | double mulW = 1;
43 |
44 | for ( int j = 0; j < numImages; ++j )
45 | mulW *= w[ j ].get().getRealDouble();
46 |
47 | value.set( (float)mulW );
48 |
49 | return value;
50 | }
51 |
52 | @Override
53 | public CombineWeightsMulRandomAccess copyRandomAccess()
54 | {
55 | final CombineWeightsMulRandomAccess r = new CombineWeightsMulRandomAccess( n, weights );
56 | r.setPosition( this );
57 | return r;
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/process/fusion/transformed/weightcombination/CombineWeightsSumRandomAccess.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.process.fusion.transformed.weightcombination;
24 |
25 | import java.util.List;
26 |
27 | import net.imglib2.RandomAccessible;
28 | import net.imglib2.type.numeric.real.FloatType;
29 |
30 | public class CombineWeightsSumRandomAccess extends CombineWeightsRandomAccess
31 | {
32 | public CombineWeightsSumRandomAccess(
33 | final int n,
34 | final List< ? extends RandomAccessible< FloatType > > weights )
35 | {
36 | super( n, weights );
37 | }
38 |
39 | @Override
40 | public FloatType get()
41 | {
42 | double sumW = 0;
43 |
44 | for ( int j = 0; j < numImages; ++j )
45 | sumW += w[ j ].get().getRealDouble();
46 |
47 | value.set( (float)sumW );
48 |
49 | return value;
50 | }
51 |
52 | @Override
53 | public CombineWeightsSumRandomAccess copyRandomAccess()
54 | {
55 | final CombineWeightsSumRandomAccess r = new CombineWeightsSumRandomAccess( n, weights );
56 | r.setPosition( this );
57 | return r;
58 | }
59 |
60 | }
61 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/process/fusion/intensity/mpicbg/SimpleErrorStatistic.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.process.fusion.intensity.mpicbg;
24 |
25 | import java.util.Arrays;
26 |
27 | class SimpleErrorStatistic
28 | {
29 | private final double[] values;
30 |
31 | private int size = 0;
32 |
33 | private double mean = 0;
34 |
35 | public SimpleErrorStatistic( final int capacity )
36 | {
37 | values = new double[ capacity ];
38 | }
39 |
40 | public double getMedian()
41 | {
42 | Arrays.sort( values, 0, size );
43 | final int m = size / 2;
44 | if ( size % 2 == 0 )
45 | return ( values[ m - 1 ] + values[ m ] ) / 2.0;
46 | else
47 | return values[ m ];
48 | }
49 |
50 | final public void add( final double new_value )
51 | {
52 | int i = size++;
53 | values[ i ] = new_value;
54 |
55 | final double delta = new_value - mean;
56 | mean += delta / size;
57 | }
58 |
59 | public int n()
60 | {
61 | return size;
62 | }
63 |
64 | public double mean()
65 | {
66 | return mean;
67 | }
68 |
69 | public void clear()
70 | {
71 | size = 0;
72 | mean = 0;
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/process/pointcloud/pointdescriptor/model/TranslationInvariantModel.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.process.pointcloud.pointdescriptor.model;
24 |
25 | import mpicbg.models.AbstractModel;
26 | import mpicbg.models.Model;
27 | import net.preibisch.mvrecon.process.pointcloud.pointdescriptor.AbstractPointDescriptor;
28 |
29 | /**
30 | * This class is a subtle hint that {@link Model}s which are used to fit {@link AbstractPointDescriptor}s should be translation invariant.
31 | *
32 | * @author Stephan Preibisch (preibisch@mpi-cbg.de)
33 | *
34 | * @param something that extends {@link Model}
35 | */
36 | public abstract class TranslationInvariantModel< M extends TranslationInvariantModel< M > > extends AbstractModel< M >
37 | {
38 | /**
39 | * The {@link TranslationInvariantModel} can tell which dimensions it supports.
40 | *
41 | * @param numDimensions - The dimensionality (e.g. 3 means 3-dimensional)
42 | * @return - If the {@link TranslationInvariantModel} supports that dimensionality
43 | */
44 | public abstract boolean canDoNumDimension( int numDimensions );
45 | }
46 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/process/interestpointregistration/global/pointmatchcreating/weak/WeakLinkPointMatchCreator.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.process.interestpointregistration.global.pointmatchcreating.weak;
24 |
25 | import java.util.HashMap;
26 | import java.util.HashSet;
27 |
28 | import net.preibisch.mvrecon.process.interestpointregistration.global.pointmatchcreating.PointMatchCreator;
29 |
30 | import mpicbg.models.Model;
31 | import mpicbg.models.Tile;
32 | import mpicbg.spim.data.sequence.ViewId;
33 |
34 | public abstract class WeakLinkPointMatchCreator< M extends Model< M > > implements PointMatchCreator
35 | {
36 | final HashMap< ViewId, Tile< M > > models1;
37 | final HashSet< ViewId > allViews;
38 |
39 | /**
40 | * @param models1 - the models from the first round of global optimization
41 | */
42 | public WeakLinkPointMatchCreator( final HashMap< ViewId, Tile< M > > models1 )
43 | {
44 | this.models1 = models1;
45 | this.allViews = new HashSet<>();
46 |
47 | this.allViews.addAll( models1.keySet() );
48 | }
49 |
50 | @Override
51 | public HashSet< ViewId > getAllViews() { return allViews; }
52 | }
53 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/process/interestpointregistration/pairwise/methods/fastrgldm/FRGLDMParameters.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.process.interestpointregistration.pairwise.methods.fastrgldm;
24 |
25 | import mpicbg.models.Model;
26 |
27 | public class FRGLDMParameters
28 | {
29 | public static double ratioOfDistance = 10;
30 |
31 | public static int redundancy = 1;
32 |
33 | protected final double rod;
34 | protected final int nn, re;
35 |
36 | private Model< ? > model = null;
37 | public Model< ? > getModel() { return model.copy(); }
38 |
39 | public FRGLDMParameters( final Model< ? > model )
40 | {
41 | this.rod = ratioOfDistance;
42 | this.nn = 3;
43 | this.re = redundancy;
44 | this.model = model;
45 | }
46 |
47 | public FRGLDMParameters( final Model< ? > model, final double ratioOfDistance, final int redundancy )
48 | {
49 | this.model = model;
50 | this.rod = ratioOfDistance;
51 | this.nn = 3;
52 | this.re = redundancy;
53 | }
54 |
55 | public double getRatioOfDistance() { return rod; }
56 | public int getNumNeighbors() { return nn; }
57 | public int getRedundancy() { return re; }
58 | }
59 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/legacy/registration/bead/error/GlobalErrorStatistics.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.legacy.registration.bead.error;
24 |
25 | public interface GlobalErrorStatistics
26 | {
27 | public double getMinAlignmentError();
28 | public double getAverageAlignmentError();
29 | public double getMaxAlignmentError();
30 |
31 | public void setMinAlignmentError( double min );
32 | public void setAverageAlignmentError( double avg );
33 | public void setMaxAlignmentError( double max );
34 |
35 | public int getNumDetections();
36 | public int getNumCandidates();
37 | public int getNumCorrespondences();
38 |
39 | public void setNumDetections( int numDetection );
40 | public void setNumCandidates( int numCandidates );
41 | public void setNumCorrespondences( int numCorrespondences );
42 |
43 | public void setAbsoluteLocalAlignmentError( double error );
44 | public void setAlignmentErrorCount( int count );
45 | public double getAbsoluteLocalAlignmentError();
46 | public int getAlignmentErrorCount();
47 |
48 | public double getAverageLocalAlignmentError();
49 |
50 | public void reset();
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/fiji/plugin/interestpointregistration/global/IndividualTimepointGUI.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.fiji.plugin.interestpointregistration.global;
24 |
25 | import java.util.ArrayList;
26 | import java.util.List;
27 |
28 | import net.preibisch.mvrecon.fiji.spimdata.SpimData2;
29 |
30 | import mpicbg.spim.data.sequence.TimePoint;
31 | import mpicbg.spim.data.sequence.ViewId;
32 |
33 | public class IndividualTimepointGUI implements GlobalGUI
34 | {
35 | final SpimData2 data;
36 |
37 | public IndividualTimepointGUI( final SpimData2 data )
38 | {
39 | this.data = data;
40 | }
41 |
42 | public List< List< ViewId > > getIndividualSets( final List< ViewId > viewIds )
43 | {
44 | final ArrayList< List< ViewId > > sets = new ArrayList<>();
45 |
46 | for ( final TimePoint timepoint : SpimData2.getAllTimePointsSorted( data, viewIds ) )
47 | {
48 | final ArrayList< ViewId > set = new ArrayList<>();
49 |
50 | for ( final ViewId viewId : viewIds )
51 | if ( viewId.getTimePointId() == timepoint.getId() )
52 | set.add( viewId );
53 |
54 | sets.add( set );
55 | }
56 |
57 | return sets;
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/fiji/spimdata/interestpoints/ViewInterestPointLists.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.fiji.spimdata.interestpoints;
24 |
25 | import java.util.HashMap;
26 |
27 | import mpicbg.spim.data.sequence.ViewId;
28 |
29 | /**
30 | * Maps from a String label to a list of interest points for a specific viewid
31 | *
32 | * @author Stephan Preibisch (stephan.preibisch@gmx.de)
33 | *
34 | */
35 | public class ViewInterestPointLists extends ViewId
36 | {
37 | protected final HashMap< String, InterestPoints > lookup;
38 |
39 | public ViewInterestPointLists( final int timepointId, final int setupId )
40 | {
41 | super( timepointId, setupId );
42 |
43 | this.lookup = new HashMap< String, InterestPoints >();
44 | }
45 |
46 | public boolean contains( final String label ) { return lookup.containsKey( label ); }
47 | public HashMap< String, InterestPoints > getHashMap() { return lookup; }
48 | public InterestPoints getInterestPointList( final String label ) { return lookup.get( label ); }
49 | public void addInterestPointList( final String label, final InterestPoints pointList ) { lookup.put( label, pointList ); }
50 | }
51 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/process/interestpointregistration/pairwise/constellation/IndividualTimepoints.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.process.interestpointregistration.pairwise.constellation;
24 |
25 | import java.util.Collection;
26 | import java.util.List;
27 | import java.util.Set;
28 |
29 | import mpicbg.spim.data.sequence.ViewId;
30 | import net.imglib2.util.Pair;
31 | import net.preibisch.mvrecon.process.interestpointregistration.pairwise.constellation.grouping.Group;
32 | import net.preibisch.mvrecon.process.interestpointregistration.pairwise.constellation.range.TimepointRange;
33 |
34 | public class IndividualTimepoints extends AllToAllRange< ViewId, TimepointRange< ViewId > >
35 | {
36 | public IndividualTimepoints(
37 | final List< ViewId > views,
38 | final Set< Group< ViewId > > groups )
39 | {
40 | super( views, groups, new TimepointRange< ViewId >( 0 ) );
41 | }
42 |
43 | public static < V extends ViewId > List< Pair< V, V > > allPairs(
44 | final List< ? extends V > views,
45 | final Collection< ? extends Group< V > > groups )
46 | {
47 | return AllToAllRange.allPairs( views, groups, new TimepointRange< V >( 0 ) );
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/LightSheetZ1ImgLoader.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.fiji.spimdata.imgloaders;
24 |
25 | import java.io.File;
26 |
27 | import mpicbg.spim.data.generic.sequence.AbstractSequenceDescription;
28 | import mpicbg.spim.data.legacy.LegacyImgLoaderWrapper;
29 | import net.imglib2.img.ImgFactory;
30 | import net.imglib2.type.NativeType;
31 | import net.imglib2.type.numeric.integer.UnsignedShortType;
32 |
33 | public class LightSheetZ1ImgLoader extends LegacyImgLoaderWrapper< UnsignedShortType, LegacyLightSheetZ1ImgLoader >
34 | {
35 | public LightSheetZ1ImgLoader(
36 | final File cziFile,
37 | final ImgFactory< ? extends NativeType< ? > > imgFactory,
38 | final AbstractSequenceDescription, ?, ?> sequenceDescription )
39 | {
40 | super( new LegacyLightSheetZ1ImgLoader( cziFile, imgFactory, sequenceDescription ) );
41 | }
42 |
43 | public File getCZIFile() { return legacyImgLoader.getCZIFile(); }
44 | public ImgFactory< ? extends NativeType< ? > > getImgFactory() { return legacyImgLoader.getImgFactory(); }
45 |
46 | @Override
47 | public String toString() {
48 | return legacyImgLoader.toString();
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/fiji/plugin/interestpointregistration/parameters/FixMapBackParameters.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.fiji.plugin.interestpointregistration.parameters;
24 |
25 | import java.util.Map;
26 | import java.util.Set;
27 |
28 | import mpicbg.models.Model;
29 | import mpicbg.spim.data.sequence.ViewId;
30 | import net.imglib2.Dimensions;
31 | import net.imglib2.util.Pair;
32 | import net.preibisch.mvrecon.process.interestpointregistration.pairwise.constellation.Subset;
33 |
34 | public class FixMapBackParameters
35 | {
36 | public static String[] fixViewsChoice = new String[]{
37 | "Fix first view",
38 | "Select fixed view",
39 | "Do not fix views" };
40 |
41 | public static String[] mapBackChoice = new String[]{
42 | "Do not map back (use this if views are fixed)",
43 | "Map back to first view using translation model",
44 | "Map back to first view using rigid model",
45 | "Map back to user defined view using translation model",
46 | "Map back to user defined view using rigid model" };
47 |
48 | public Set< ViewId > fixedViews;
49 | public Model< ? > model;
50 | public Map< Subset< ViewId >, Pair< ViewId, Dimensions > > mapBackViews;
51 | }
52 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/process/interestpointregistration/global/pointmatchcreating/Link.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.process.interestpointregistration.global.pointmatchcreating;
24 |
25 | import net.imglib2.RealInterval;
26 | import net.imglib2.realtransform.AffineGet;
27 |
28 | public class Link
29 | {
30 | private final T first;
31 | private final T second;
32 | private final AffineGet transform;
33 | private final double linkQuality;
34 | private final RealInterval boundingBox;
35 |
36 | public Link(final T fst, final T snd, final RealInterval boundingBox, final AffineGet transform, final double linkQuality)
37 | {
38 | this.first = fst;
39 | this.second = snd;
40 | this.transform = transform;
41 | this.linkQuality = linkQuality;
42 | this.boundingBox = boundingBox;
43 | }
44 |
45 | public RealInterval getBoundingBox() { return boundingBox; }
46 | public T getFirst() { return first; }
47 | public T getSecond() { return second; }
48 | public AffineGet getTransform() { return transform; }
49 | public double getLinkQuality() { return linkQuality; }
50 |
51 | @Override
52 | public String toString()
53 | { return "("+ first.toString() + ", " + second.toString() + ")"; }
54 | }
55 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/process/interestpointregistration/pairwise/constellation/range/ReferenceTimepointRange.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.process.interestpointregistration.pairwise.constellation.range;
24 |
25 | import mpicbg.spim.data.sequence.TimePoint;
26 | import mpicbg.spim.data.sequence.ViewId;
27 |
28 | public class ReferenceTimepointRange< V extends ViewId > implements RangeComparator< V >
29 | {
30 | final int referenceTimepoint;
31 |
32 | public ReferenceTimepointRange( final int referenceTimepoint )
33 | {
34 | this.referenceTimepoint = referenceTimepoint;
35 | }
36 | public ReferenceTimepointRange( final TimePoint referenceTimepoint )
37 | {
38 | this( referenceTimepoint.getId() );
39 | }
40 |
41 | @Override
42 | public boolean inRange( final V view1, final V view2 )
43 | {
44 | // if one of the views is a reference timepoint or if they are from the same timepoint (fixed views are discarded later)
45 | if ( view1.getTimePointId() == referenceTimepoint || view2.getTimePointId() == referenceTimepoint || view1.getTimePointId() == view2.getTimePointId() )
46 | return true;
47 | else
48 | return false;
49 | }
50 |
51 | public int getReferenceTimepointId() { return referenceTimepoint; }
52 | }
53 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/fiji/spimdata/imgloaders/filemap2/FileMapEntry.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.fiji.spimdata.imgloaders.filemap2;
24 |
25 | import java.io.File;
26 | import java.util.Objects;
27 |
28 | public class FileMapEntry
29 | {
30 | private final File file;
31 |
32 | private final int series;
33 |
34 | private final int channel;
35 |
36 | // TODO: rename to FileSeriesChannel ?
37 | public FileMapEntry( final File file, final int series, final int channel )
38 | {
39 | this.file = file;
40 | this.series = series;
41 | this.channel = channel;
42 | }
43 |
44 | public File file()
45 | {
46 | return file;
47 | }
48 |
49 | public int series()
50 | {
51 | return series;
52 | }
53 |
54 | public int channel()
55 | {
56 | return channel;
57 | }
58 |
59 | @Override
60 | public boolean equals( final Object o )
61 | {
62 | if ( this == o )
63 | return true;
64 | if ( !( o instanceof FileMapEntry ) )
65 | return false;
66 | final FileMapEntry that = ( FileMapEntry ) o;
67 | return series == that.series && channel == that.channel && Objects.equals( file, that.file );
68 | }
69 |
70 | @Override
71 | public int hashCode()
72 | {
73 | return Objects.hash( file, series, channel );
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/process/pointcloud/pointdescriptor/test/PointNode.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.process.pointcloud.pointdescriptor.test;
24 |
25 | import fiji.util.node.Leaf;
26 | import mpicbg.models.Point;
27 |
28 | public class PointNode extends Point implements Leaf
29 | {
30 | /**
31 | *
32 | */
33 | private static final long serialVersionUID = 1L;
34 |
35 | final int numDimensions;
36 |
37 | public PointNode( final Point p )
38 | {
39 | super( p.getL().clone(), p.getW().clone() );
40 | this.numDimensions = l.length;
41 | }
42 |
43 | public PointNode( final double[] l )
44 | {
45 | super( l );
46 | this.numDimensions = l.length;
47 | }
48 |
49 | public PointNode( final double[] l, final double[] w )
50 | {
51 | super( l, w );
52 | this.numDimensions = l.length;
53 | }
54 |
55 | @Override
56 | public PointNode[] createArray( final int n ) { return new PointNode[ n ]; }
57 |
58 | @Override
59 | public float distanceTo( final PointNode other ) { return (float)Point.distance( this, other ); }
60 |
61 | @Override
62 | public float get( final int k ) { return (float)w[ k ]; }
63 |
64 | @Override
65 | public int getNumDimensions() { return numDimensions; }
66 |
67 | @Override
68 | public boolean isLeaf() { return true; }
69 | }
70 |
--------------------------------------------------------------------------------
/src/main/java/net/preibisch/mvrecon/process/interestpointregistration/global/pointmatchcreating/weak/MetaDataWeakLinkFactory.java:
--------------------------------------------------------------------------------
1 | /*-
2 | * #%L
3 | * Software for the reconstruction of multi-view microscopic acquisitions
4 | * like Selective Plane Illumination Microscopy (SPIM) Data.
5 | * %%
6 | * Copyright (C) 2012 - 2025 Multiview Reconstruction developers.
7 | * %%
8 | * This program is free software: you can redistribute it and/or modify
9 | * it under the terms of the GNU General Public License as
10 | * published by the Free Software Foundation, either version 2 of the
11 | * License, or (at your option) any later version.
12 | *
13 | * This program is distributed in the hope that it will be useful,
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 | * GNU General Public License for more details.
17 | *
18 | * You should have received a copy of the GNU General Public
19 | * License along with this program. If not, see
20 | * .
21 | * #L%
22 | */
23 | package net.preibisch.mvrecon.process.interestpointregistration.global.pointmatchcreating.weak;
24 |
25 | import java.util.HashMap;
26 | import java.util.Map;
27 |
28 | import net.preibisch.mvrecon.process.interestpointregistration.pairwise.constellation.overlap.OverlapDetection;
29 |
30 | import mpicbg.models.Model;
31 | import mpicbg.models.Tile;
32 | import mpicbg.spim.data.registration.ViewRegistration;
33 | import mpicbg.spim.data.sequence.ViewId;
34 |
35 | public class MetaDataWeakLinkFactory implements WeakLinkFactory
36 | {
37 | final OverlapDetection< ViewId > overlapDetection;
38 | final Map< ViewId, ViewRegistration > viewRegistrations;
39 |
40 | public MetaDataWeakLinkFactory(
41 | final Map< ViewId, ViewRegistration > viewRegistrations,
42 | final OverlapDetection< ViewId > overlapDetection )
43 | {
44 | this.viewRegistrations = viewRegistrations;
45 | this.overlapDetection = overlapDetection;
46 | }
47 |
48 | @Override
49 | public < M extends Model< M > > WeakLinkPointMatchCreator< M > create(
50 | final HashMap< ViewId, Tile< M > > models )
51 | {
52 | return new MetaDataWeakLinkCreator<>( models, overlapDetection, viewRegistrations );
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------