public class Partition extends Object
Constructor and Description |
---|
Partition(String path,
int[] timepointIdsSequence,
int[] setupIdsSequence,
int[] timepointIdsPartition,
int[] setupIdsPartition)
Create a new Partition description.
|
Partition(String path,
Map<Integer,Integer> timepointIdSequenceToPartition,
Map<Integer,Integer> setupIdSequenceToPartition)
Create a new Partition description.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(ViewId viewId)
Does this partition contain the given
view
(timepoint-setup pair)? |
String |
getPath()
Get the path to the hdf5 file for this partition.
|
Map<Integer,Integer> |
getSetupIdSequenceToPartition()
Get a map from
setup ids of the full
sequence to setup ids of this partition. |
Map<Integer,Integer> |
getTimepointIdSequenceToPartition()
Get a map from
timepoint ids of the full
sequence to timepoint ids of this partition. |
static ArrayList<Partition> |
split(List<TimePoint> timepoints,
List<? extends BasicViewSetup> setups,
int timepointsPerPartition,
int setupsPerPartition,
String basename)
Split a sequence into partitions, each containing a specified number of
timepoints and setups.
|
protected final String path
public Partition(String path, int[] timepointIdsSequence, int[] setupIdsSequence, int[] timepointIdsPartition, int[] setupIdsPartition)
path
- path to the hdf5 file for this partitiontimepointIdsSequence
- setupIdsSequence
- timepointIdsPartition
- setupIdsPartition
- public String getPath()
public Map<Integer,Integer> getTimepointIdSequenceToPartition()
timepoint ids
of the full
sequence to timepoint ids of this partition.public Map<Integer,Integer> getSetupIdSequenceToPartition()
setup ids
of the full
sequence to setup ids of this partition.public boolean contains(ViewId viewId)
view
(timepoint-setup pair)?viewId
- view (timepoint and setup id wrt. the full sequence)public static ArrayList<Partition> split(List<TimePoint> timepoints, List<? extends BasicViewSetup> setups, int timepointsPerPartition, int setupsPerPartition, String basename)
timepoints
- list of all TimePoint
s.setups
- list of all BasicViewSetup
s.timepointsPerPartition
- how many timepoints should each partition contain (if this is
≤0, put do not split timepoints across partitions).setupsPerPartition
- how many setups should each partition contain (if this is
≤0, put do not split setups across partitions).basename
- This is used to generate paths for the partitions. Partitions
are named "basename-TT-SS.h5" where TT and SS are the index of
the timepoint and setup batch, respectively.Copyright © 2015–2021 Fiji. All rights reserved.