Class Group<V>
java.lang.Object
net.preibisch.mvrecon.process.interestpointregistration.pairwise.constellation.grouping.Group<V>
- All Implemented Interfaces:
Serializable,Iterable<V>
- Direct Known Subclasses:
Subset
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <V extends mpicbg.spim.data.generic.sequence.BasicViewDescription<?>>
List<Group<V>> combineBy(List<V> vds, Set<Class<? extends mpicbg.spim.data.generic.base.Entity>> groupingFactors) Combining means to combine all views that share everything except what they are grouped after, e.g. channel (for example used to group GFP, RFP, DAPI for a Tile) v1: angle 0, channel 0 v2: angle 1, channel 0 v3: angle 1, channel 1 combine by channel: [v1], [v2 v3]static <V extends mpicbg.spim.data.generic.sequence.BasicViewDescription<?>>
List<Group<V>> combineOrSplitBy(List<V> vds, Set<Class<? extends mpicbg.spim.data.generic.base.Entity>> groupingFactors, boolean combine) Combining means to combine all views that share everything except what they are grouped after, e.g. channel (for example used to group GFP, RFP, DAPI for a Tile) Split means the opposite in some way, make a group for every instance of an attribute, e.g. channel (for example group everthing that is GFP and everything that it RFP) v1: angle 0, channel 0 v2: angle 1, channel 0 v3: angle 1, channel 1 combine by channel: [v1], [v2 v3] split by channel: [v1 v2], [v3]booleanstatic <V> booleancontainsBoth(V viewIdA, V viewIdB, Collection<? extends Group<V>> groupCollection) booleanvoidfilterMissingViews(Set<? extends V> missingViews) static <V> voidfilterMissingViews(Group<V> group, Set<? extends V> missingViews) static <V extends mpicbg.spim.data.sequence.ViewId>
ArrayList<Group<V>> getGroupsSorted(Collection<Group<V>> groups) getViews()static <V extends mpicbg.spim.data.sequence.ViewId>
List<V> getViewsSorted(Collection<V> views) static <V extends mpicbg.spim.data.sequence.ViewId>
ArrayList<Group<V>> groupByChannel(List<V> viewIds, mpicbg.spim.data.generic.sequence.AbstractSequenceDescription<?, ? extends mpicbg.spim.data.generic.sequence.BasicViewDescription<?>, ?> sd) static Stringgvids(Collection<?> group) static StringinthashCode()static <V> Group<V> isContained(V view, Collection<? extends Group<V>> groupCollection) iterator()static voidIdentifies all groups that a certain view is a member ofstatic <V> Group<V> Merges two Groups of viewsmergeAllOverlappingGroups(Collection<Group<V>> groups) Merges all overlapping groups into a new List, the input remains unchangedstatic <V> Group<V> mergeOverlapping(Group<V> groupA, Group<V> groupB) Merges two Groups of viewsstatic <V> net.imglib2.util.Pair<Integer, Integer> nextOverlappingGroup(List<Group<V>> groups) Identify the indices of the next overlapping groups ordered by size, or return null if none are overlappingstatic <V> ArrayList<net.imglib2.util.Pair<Group<V>, Group<V>>> overlappingGroups(Collection<Group<V>> groups) Identify all pairs of overlapping groupsstatic <V> booleanTest if there is any overlap between two groups (at least one view part of both)static Stringpvid(mpicbg.spim.data.sequence.ViewId viewId) static Stringstatic <V> voidremoveEmptyGroups(List<Group<V>> groups) intsize()static <V extends mpicbg.spim.data.generic.sequence.BasicViewDescription<?>>
List<Group<V>> splitBy(List<V> vds, Set<Class<? extends mpicbg.spim.data.generic.base.Entity>> groupingFactors) Split means to make a group for every instance of an attribute, e.g. channel (for example group everthing that is GFP and everything that it RFP) v1: angle 0, channel 0 v2: angle 1, channel 0 v3: angle 1, channel 1 split by channel: [v1 v2], [v3]static <V extends mpicbg.spim.data.sequence.ViewId>
ArrayList<Group<V>> toGroup(Collection<V> views) static <V extends mpicbg.spim.data.sequence.ViewId>
ArrayList<Group<V>> toGroups(Collection<V> views) toString()toViewIdGroup(Collection<? extends mpicbg.spim.data.sequence.ViewId> views) toViewIdGroups(Collection<? extends mpicbg.spim.data.sequence.ViewId> views) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
views
-
-
Constructor Details
-
Group
-
Group
-
Group
public Group()
-
-
Method Details
-
getViews
-
size
public int size() -
contains
-
iterator
-
hashCode
public int hashCode() -
equals
-
toString
-
filterMissingViews
-
filterMissingViews
-
getViewsSorted
public static <V extends mpicbg.spim.data.sequence.ViewId> List<V> getViewsSorted(Collection<V> views) -
getGroupsSorted
public static <V extends mpicbg.spim.data.sequence.ViewId> ArrayList<Group<V>> getGroupsSorted(Collection<Group<V>> groups) -
combineBy
public static <V extends mpicbg.spim.data.generic.sequence.BasicViewDescription<?>> List<Group<V>> combineBy(List<V> vds, Set<Class<? extends mpicbg.spim.data.generic.base.Entity>> groupingFactors) Combining means to combine all views that share everything except what they are grouped after, e.g. channel (for example used to group GFP, RFP, DAPI for a Tile) v1: angle 0, channel 0 v2: angle 1, channel 0 v3: angle 1, channel 1 combine by channel: [v1], [v2 v3]- Type Parameters:
V- - something that extendsBasicViewDescription- Parameters:
vds- - the ViewDescriptions to processgroupingFactors- - by which attribute(s)- Returns:
- - list of groups
-
splitBy
public static <V extends mpicbg.spim.data.generic.sequence.BasicViewDescription<?>> List<Group<V>> splitBy(List<V> vds, Set<Class<? extends mpicbg.spim.data.generic.base.Entity>> groupingFactors) Split means to make a group for every instance of an attribute, e.g. channel (for example group everthing that is GFP and everything that it RFP) v1: angle 0, channel 0 v2: angle 1, channel 0 v3: angle 1, channel 1 split by channel: [v1 v2], [v3]- Type Parameters:
V- - something that extendsBasicViewDescription- Parameters:
vds- - the ViewDescriptions to processgroupingFactors- - by which attribute(s)- Returns:
- - list of groups
-
combineOrSplitBy
public static <V extends mpicbg.spim.data.generic.sequence.BasicViewDescription<?>> List<Group<V>> combineOrSplitBy(List<V> vds, Set<Class<? extends mpicbg.spim.data.generic.base.Entity>> groupingFactors, boolean combine) Combining means to combine all views that share everything except what they are grouped after, e.g. channel (for example used to group GFP, RFP, DAPI for a Tile) Split means the opposite in some way, make a group for every instance of an attribute, e.g. channel (for example group everthing that is GFP and everything that it RFP) v1: angle 0, channel 0 v2: angle 1, channel 0 v3: angle 1, channel 1 combine by channel: [v1], [v2 v3] split by channel: [v1 v2], [v3]- Type Parameters:
V- - something that extendsBasicViewDescription- Parameters:
vds- - the ViewDescriptions to processgroupingFactors- - by which attribute(s)combine- - combine or split- Returns:
- - list of groups
-
toGroups
public static <V extends mpicbg.spim.data.sequence.ViewId> ArrayList<Group<V>> toGroups(Collection<V> views) -
toViewIdGroups
public static ArrayList<Group<mpicbg.spim.data.sequence.ViewId>> toViewIdGroups(Collection<? extends mpicbg.spim.data.sequence.ViewId> views) -
toGroup
public static <V extends mpicbg.spim.data.sequence.ViewId> ArrayList<Group<V>> toGroup(Collection<V> views) -
toViewIdGroup
public static ArrayList<Group<mpicbg.spim.data.sequence.ViewId>> toViewIdGroup(Collection<? extends mpicbg.spim.data.sequence.ViewId> views) -
groupByChannel
public static <V extends mpicbg.spim.data.sequence.ViewId> ArrayList<Group<V>> groupByChannel(List<V> viewIds, mpicbg.spim.data.generic.sequence.AbstractSequenceDescription<?, ? extends mpicbg.spim.data.generic.sequence.BasicViewDescription<?>, ?> sd) -
containsBoth
public static <V> boolean containsBoth(V viewIdA, V viewIdB, Collection<? extends Group<V>> groupCollection) -
isContained
-
overlaps
Test if there is any overlap between two groups (at least one view part of both)- Type Parameters:
V- - view id type- Parameters:
groupA- - first groupgroupB- - second group- Returns:
- whether there is overlap
-
memberOf
Identifies all groups that a certain view is a member of- Type Parameters:
V- - view id type- Parameters:
view- - a viewgroups- - all views- Returns:
- the groups that view is a member of
-
overlappingGroups
public static <V> ArrayList<net.imglib2.util.Pair<Group<V>,Group<V>>> overlappingGroups(Collection<Group<V>> groups) Identify all pairs of overlapping groups- Type Parameters:
V- - view id type- Parameters:
groups- the groups- Returns:
- all overlapping group pairs
-
mergeAllOverlappingGroups
Merges all overlapping groups into a new List, the input remains unchanged- Type Parameters:
V- - view id type- Parameters:
groups- the groups to merge- Returns:
- merger Groups
-
nextOverlappingGroup
public static <V> net.imglib2.util.Pair<Integer,Integer> nextOverlappingGroup(List<Group<V>> groups) Identify the indices of the next overlapping groups ordered by size, or return null if none are overlapping- Type Parameters:
V- - view id type- Parameters:
groups- list of Groups- Returns:
- index of first overlapping pair (Gi, Gj) in grops
-
merge
Merges two Groups of views- Type Parameters:
V- - view id type- Parameters:
groupA- first GroupgroupB- second Group- Returns:
- merged Group
-
mergeOverlapping
Merges two Groups of views- Type Parameters:
V- - view id type- Parameters:
groupA- first GroupgroupB- second Group- Returns:
- merged Group
-
removeEmptyGroups
-
pvid
-
pvids
-
gvids
-
gvids
-
main
-