Class CorrespondenceTools
java.lang.Object
net.preibisch.mvrecon.fiji.spimdata.interestpoints.CorrespondenceTools
Utility methods for managing interest point correspondences.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intremoveCorrespondencesForViewLabel(ViewInterestPoints vip, mpicbg.spim.data.sequence.ViewId viewId, String label, int numThreads) Removes correspondences pointing to a specific view+label from all other views.static intremoveCorrespondencesNotToViews(ViewInterestPoints vip, Set<mpicbg.spim.data.sequence.ViewId> viewsToKeep, int numThreads) Inverse ofremoveCorrespondencesToViews(net.preibisch.mvrecon.fiji.spimdata.interestpoints.ViewInterestPoints, java.util.Set<mpicbg.spim.data.sequence.ViewId>, int): removes correspondences whose correspondingViewId is NOT in the given set of views to keep.static intremoveCorrespondencesToLabel(ViewInterestPoints vip, String label, int numThreads) Removes correspondences whosecorrespondingLabelequals the given label, from every view's every (other) interest-point list.static intremoveCorrespondencesToViews(ViewInterestPoints vip, Set<mpicbg.spim.data.sequence.ViewId> viewsToRemove, int numThreads) Removes all correspondences pointing TO the specified views from ALL other views.
-
Constructor Details
-
CorrespondenceTools
public CorrespondenceTools()
-
-
Method Details
-
removeCorrespondencesToViews
public static int removeCorrespondencesToViews(ViewInterestPoints vip, Set<mpicbg.spim.data.sequence.ViewId> viewsToRemove, int numThreads) Removes all correspondences pointing TO the specified views from ALL other views. Multithreaded - one thread per target view being cleaned. Used by MissingViewsPopup when removing entire views.- Parameters:
vip- ViewInterestPoints containing all interest point dataviewsToRemove- Set of ViewIds whose correspondences should be removednumThreads- Number of threads to use- Returns:
- Number of correspondence entries removed
-
removeCorrespondencesNotToViews
public static int removeCorrespondencesNotToViews(ViewInterestPoints vip, Set<mpicbg.spim.data.sequence.ViewId> viewsToKeep, int numThreads) Inverse ofremoveCorrespondencesToViews(net.preibisch.mvrecon.fiji.spimdata.interestpoints.ViewInterestPoints, java.util.Set<mpicbg.spim.data.sequence.ViewId>, int): removes correspondences whose correspondingViewId is NOT in the given set of views to keep. Multithreaded - one thread per source view being cleaned. Useful for repair flows where some target views were deleted entirely from the SpimData (so they don't appear as orphan IP-map keys at all) — filtering by a set of "removed" views misses those refs, while filtering against the canonical set of valid views catches them. Only iterates views that are present inviewsToKeep(orphan IP-map entries, if any, are skipped — they are typically about to be deleted anyway).- Parameters:
vip- ViewInterestPoints containing all interest point dataviewsToKeep- Set of ViewIds whose correspondences are valid; correspondences pointing to any other ViewId are droppednumThreads- Number of threads to use- Returns:
- Number of correspondence entries removed
-
removeCorrespondencesToLabel
public static int removeCorrespondencesToLabel(ViewInterestPoints vip, String label, int numThreads) Removes correspondences whosecorrespondingLabelequals the given label, from every view's every (other) interest-point list. Multithreaded - one thread per source view being cleaned. Useful when a label is being removed across the whole dataset: after dropping the (view, label) entries themselves, call this to also drop the cross-references in the remaining labels' correspondence lists.- Parameters:
vip- ViewInterestPoints containing all interest point datalabel- The corresponding-label value whose references should be droppednumThreads- Number of threads to use- Returns:
- Number of correspondence entries removed
-
removeCorrespondencesForViewLabel
public static int removeCorrespondencesForViewLabel(ViewInterestPoints vip, mpicbg.spim.data.sequence.ViewId viewId, String label, int numThreads) Removes correspondences pointing to a specific view+label from all other views. Multithreaded - one thread per target view being cleaned. Used by InterestPointExplorerPanel when deleting a single label.- Parameters:
vip- ViewInterestPoints containing all interest point dataviewId- The ViewId whose label is being deletedlabel- The label being deletednumThreads- Number of threads to use- Returns:
- Number of correspondence entries removed
-