Package process
Class Matching
java.lang.Object
process.Matching
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddPointMatches(ArrayList<mpicbg.models.PointMatch> correspondences, mpicbg.models.Tile<?> tileA, mpicbg.models.Tile<?> tileB) protected static ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> computeDoG(mpicbg.imglib.image.Image<mpicbg.imglib.type.numeric.real.FloatType> image, float sigma1, float sigma2, boolean lookForMaxima, boolean lookForMinima, float threshold, int localization, int iterations, double[] sigmaGuess, int[] region) static float[]computeMinMax(ij.ImagePlus imp, int channel) Computes the global intensity min/max over all slices and frames of the given (zero-based) channel.protected static StringcomputeRANSAC(ArrayList<mpicbg.models.PointMatch> candidates, ArrayList<mpicbg.models.PointMatch> inliers, mpicbg.models.Model<?> model, float maxEpsilon) static voidconcatenateAxialScaling(mpicbg.models.AbstractAffineModel3D<?> model, double zStretching) Concatenates an axial (z) scaling to a 3D affine/rigid model, in-place.convertToFloat(ij.ImagePlus imp, int channel, int timepoint, float[] minmax) Normalize and make a copy of theImagePlusinto anImageof FloatType for faster access when copying the slicesconvertToFloat(ij.ImagePlus imp, int channel, int timepoint, float[] minmax, float[] minmaxUsed) protected static intcountMatches(List<ComparePair> pairs) protected static ArrayList<net.preibisch.mvrecon.process.pointcloud.pointdescriptor.AbstractPointDescriptor> createModelPointDescriptors(fiji.util.KDTree<Particle> tree, ArrayList<Particle> basisPoints, int numNeighbors, net.preibisch.mvrecon.process.pointcloud.pointdescriptor.matcher.Matcher matcher, net.preibisch.mvrecon.process.pointcloud.pointdescriptor.similarity.SimilarityMeasure similarityMeasure, int dimensionality) protected static ArrayList<net.preibisch.mvrecon.process.pointcloud.pointdescriptor.AbstractPointDescriptor> createSimplePointDescriptors(fiji.util.KDTree<Particle> tree, ArrayList<Particle> basisPoints, int numNeighbors, net.preibisch.mvrecon.process.pointcloud.pointdescriptor.matcher.Matcher matcher, net.preibisch.mvrecon.process.pointcloud.pointdescriptor.similarity.SimilarityMeasure similarityMeasure) static intdescriptorBasedRegistration(ij.ImagePlus imp1, ij.ImagePlus imp2, DescriptorParameters params) static Vector<ComparePair> descriptorMatching(ArrayList<ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>>> peaks, int numImages, DescriptorParameters params, float zStretching) static ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> extractCandidates(ij.ImagePlus imp, int channel, int timepoint, DescriptorParameters params, float[] minmax) protected static ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> filterForROI(ij.gui.Roi roi, ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> peaks) protected static ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> filterForROI(ij.gui.Roi roi, ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> peaks, mpicbg.models.Model<?> model) protected static final ArrayList<mpicbg.models.PointMatch> findCorrespondingDescriptors(ArrayList<net.preibisch.mvrecon.process.pointcloud.pointdescriptor.AbstractPointDescriptor> descriptorsA, ArrayList<net.preibisch.mvrecon.process.pointcloud.pointdescriptor.AbstractPointDescriptor> descriptorsB, float nTimesBetter) protected static Vector<ComparePair> getComparePairs(DescriptorParameters params, int numImages) protected static ArrayList<mpicbg.models.PointMatch> getCorrespondenceCandidates(double nTimesBetter, net.preibisch.mvrecon.process.pointcloud.pointdescriptor.matcher.Matcher matcher, ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> peaks1, ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> peaks2, mpicbg.models.Model<?> model, int dimensionality, float zStretching1, float zStretching2, String explanation) globalOptimization(Vector<ComparePair> pairs, int numImages, DescriptorParameters params) static voidstatic float[]normalizeImage(mpicbg.imglib.image.Image<mpicbg.imglib.type.numeric.real.FloatType> image, float[] minmax) Normalizes an imglib1 image in-place to the range [0, 1].protected static mpicbg.models.Model<?> pairwiseMatching(ArrayList<mpicbg.models.PointMatch> finalInliers, ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> peaks1, ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> peaks2, float zStretching1, float zStretching2, DescriptorParameters params, String explanation) protected static intperformIteration(ArrayList<mpicbg.models.InvertibleBoundable> lastModels, ArrayList<ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>>> peaksComplete, int numImages, DescriptorParameters params, float zStretching) Computes one iteration and updates the lastModels ArrayList with the new modelsprotected static int[]removeInvalidAndCollectStatistics(ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> peaks) protected static voidsetPointRois(ij.ImagePlus imp1, ij.ImagePlus imp2, ArrayList<mpicbg.models.PointMatch> inliers) protected static voidwritePoints(ArrayList<mpicbg.models.PointMatch> finalInliers, DescriptorParameters params, mpicbg.models.Model<?> finalModel, PrintWriter out)
-
Field Details
-
applyScaling
public static boolean applyScaling -
factor
public static float factor -
outAll
-
-
Constructor Details
-
Matching
public Matching()
-
-
Method Details
-
descriptorBasedRegistration
public static int descriptorBasedRegistration(ij.ImagePlus imp1, ij.ImagePlus imp2, DescriptorParameters params) - Parameters:
imp1-imp2-params-- Returns:
- - the number of inliers
-
descriptorBasedStackRegistration
public static ArrayList<mpicbg.models.InvertibleBoundable> descriptorBasedStackRegistration(ij.ImagePlus imp, DescriptorParameters params) -
performIteration
protected static int performIteration(ArrayList<mpicbg.models.InvertibleBoundable> lastModels, ArrayList<ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>>> peaksComplete, int numImages, DescriptorParameters params, float zStretching) Computes one iteration and updates the lastModels ArrayList with the new models- Parameters:
lastModels- - models from last iteration (or init)peaksComplete- - all peaks for all imagesnumImages- - how many images are thereparams- - the parameterszStretching- - the zStretching if applicable- Returns:
- the number of matches found
-
countMatches
-
descriptorMatching
public static Vector<ComparePair> descriptorMatching(ArrayList<ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>>> peaks, int numImages, DescriptorParameters params, float zStretching) -
globalOptimization
public static ArrayList<mpicbg.models.InvertibleBoundable> globalOptimization(Vector<ComparePair> pairs, int numImages, DescriptorParameters params) -
addPointMatches
public static void addPointMatches(ArrayList<mpicbg.models.PointMatch> correspondences, mpicbg.models.Tile<?> tileA, mpicbg.models.Tile<?> tileB) -
getComparePairs
-
pairwiseMatching
protected static mpicbg.models.Model<?> pairwiseMatching(ArrayList<mpicbg.models.PointMatch> finalInliers, ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> peaks1, ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> peaks2, float zStretching1, float zStretching2, DescriptorParameters params, String explanation) -
writePoints
protected static void writePoints(ArrayList<mpicbg.models.PointMatch> finalInliers, DescriptorParameters params, mpicbg.models.Model<?> finalModel, PrintWriter out) -
computeMinMax
Computes the global intensity min/max over all slices and frames of the given (zero-based) channel. The work is distributed over all available threads, one (z,t) plane per task. -
extractCandidates
public static ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> extractCandidates(ij.ImagePlus imp, int channel, int timepoint, DescriptorParameters params, float[] minmax) -
convertToFloat
public static mpicbg.imglib.image.Image<mpicbg.imglib.type.numeric.real.FloatType> convertToFloat(ij.ImagePlus imp, int channel, int timepoint, float[] minmax) Normalize and make a copy of theImagePlusinto anImageof FloatType for faster access when copying the slices- Parameters:
imp- - theImagePlusinput image- Returns:
- - the normalized copy [0...1]
-
convertToFloat
public static mpicbg.imglib.image.Image<mpicbg.imglib.type.numeric.real.FloatType> convertToFloat(ij.ImagePlus imp, int channel, int timepoint, float[] minmax, float[] minmaxUsed) - Parameters:
minmaxUsed- - if non-null (length >= 2), is filled with the intensity min/max actually applied for normalization (the auto-computed per-image range whenminmax == null, otherwiseminmax).
-
filterForROI
-
filterForROI
protected static ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> filterForROI(ij.gui.Roi roi, ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> peaks, mpicbg.models.Model<?> model) -
setPointRois
protected static void setPointRois(ij.ImagePlus imp1, ij.ImagePlus imp2, ArrayList<mpicbg.models.PointMatch> inliers) -
computeRANSAC
protected static String computeRANSAC(ArrayList<mpicbg.models.PointMatch> candidates, ArrayList<mpicbg.models.PointMatch> inliers, mpicbg.models.Model<?> model, float maxEpsilon) -
getCorrespondenceCandidates
protected static ArrayList<mpicbg.models.PointMatch> getCorrespondenceCandidates(double nTimesBetter, net.preibisch.mvrecon.process.pointcloud.pointdescriptor.matcher.Matcher matcher, ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> peaks1, ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> peaks2, mpicbg.models.Model<?> model, int dimensionality, float zStretching1, float zStretching2, String explanation) -
findCorrespondingDescriptors
protected static final ArrayList<mpicbg.models.PointMatch> findCorrespondingDescriptors(ArrayList<net.preibisch.mvrecon.process.pointcloud.pointdescriptor.AbstractPointDescriptor> descriptorsA, ArrayList<net.preibisch.mvrecon.process.pointcloud.pointdescriptor.AbstractPointDescriptor> descriptorsB, float nTimesBetter) -
createSimplePointDescriptors
protected static ArrayList<net.preibisch.mvrecon.process.pointcloud.pointdescriptor.AbstractPointDescriptor> createSimplePointDescriptors(fiji.util.KDTree<Particle> tree, ArrayList<Particle> basisPoints, int numNeighbors, net.preibisch.mvrecon.process.pointcloud.pointdescriptor.matcher.Matcher matcher, net.preibisch.mvrecon.process.pointcloud.pointdescriptor.similarity.SimilarityMeasure similarityMeasure) -
createModelPointDescriptors
protected static ArrayList<net.preibisch.mvrecon.process.pointcloud.pointdescriptor.AbstractPointDescriptor> createModelPointDescriptors(fiji.util.KDTree<Particle> tree, ArrayList<Particle> basisPoints, int numNeighbors, net.preibisch.mvrecon.process.pointcloud.pointdescriptor.matcher.Matcher matcher, net.preibisch.mvrecon.process.pointcloud.pointdescriptor.similarity.SimilarityMeasure similarityMeasure, int dimensionality) -
computeDoG
protected static ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> computeDoG(mpicbg.imglib.image.Image<mpicbg.imglib.type.numeric.real.FloatType> image, float sigma1, float sigma2, boolean lookForMaxima, boolean lookForMinima, float threshold, int localization, int iterations, double[] sigmaGuess, int[] region) -
concatenateAxialScaling
public static void concatenateAxialScaling(mpicbg.models.AbstractAffineModel3D<?> model, double zStretching) Concatenates an axial (z) scaling to a 3D affine/rigid model, in-place. This is a local reimplementation of the formermpicbg.spim.registration.bead.BeadRegistration.concatenateAxialScaling, which was removed when SPIM_Registration was superseded by multiview-reconstruction.- Parameters:
model- - the model to modify (must be anAffineModel3DorRigidModel3D)zStretching- - the axial scaling factor (pixelDepth / pixelWidth)
-
normalizeImage
public static float[] normalizeImage(mpicbg.imglib.image.Image<mpicbg.imglib.type.numeric.real.FloatType> image, float[] minmax) Normalizes an imglib1 image in-place to the range [0, 1]. This is a local reimplementation of the formermpicbg.spim.registration.ViewDataBeads.normalizeImage, which was removed when SPIM_Registration was superseded by multiview-reconstruction.- Parameters:
image- - the image to normalize (modified in-place)minmax- - the min/max to map to [0, 1]; if null/too short the current display range is used- Returns:
- the original { min, max } that were mapped to { 0, 1 }
-
removeInvalidAndCollectStatistics
protected static int[] removeInvalidAndCollectStatistics(ArrayList<mpicbg.imglib.algorithm.scalespace.DifferenceOfGaussianPeak<mpicbg.imglib.type.numeric.real.FloatType>> peaks) -
main
-