- java.lang.Object
-
- bdv.img.hdf5.Partition
-
public class Partition extends Object
Partition describes one partition file of a dataset that is split across multiple hdf5 files. An aggregating hdf5 linking the partition files can be created using the Partition information (without looking at the constituent files).- Author:
- Tobias Pietzsch
-
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancontains(mpicbg.spim.data.sequence.ViewId viewId)Does this partition contain the givenview(timepoint-setup pair)?StringgetPath()Get the path to the hdf5 file for this partition.Map<Integer,Integer>getSetupIdSequenceToPartition()Get a map fromsetup idsof the full sequence to setup ids of this partition.Map<Integer,Integer>getTimepointIdSequenceToPartition()Get a map fromtimepoint idsof the full sequence to timepoint ids of this partition.static ArrayList<Partition>split(List<mpicbg.spim.data.sequence.TimePoint> timepoints, List<? extends mpicbg.spim.data.generic.sequence.BasicViewSetup> setups, int timepointsPerPartition, int setupsPerPartition, String basename)Split a sequence into partitions, each containing a specified number of timepoints and setups.
-
-
-
Field Detail
-
path
protected final String path
-
-
Constructor Detail
-
Partition
public Partition(String path, int[] timepointIdsSequence, int[] setupIdsSequence, int[] timepointIdsPartition, int[] setupIdsPartition)
Create a new Partition description.- Parameters:
path- path to the hdf5 file for this partitiontimepointIdsSequence-setupIdsSequence-timepointIdsPartition-setupIdsPartition-
-
Partition
public Partition(String path, Map<Integer,Integer> timepointIdSequenceToPartition, Map<Integer,Integer> setupIdSequenceToPartition)
Create a new Partition description.- Parameters:
path- path to the hdf5 file for this partitiontimepointIdSequenceToPartition-setupIdSequenceToPartition-
-
-
Method Detail
-
getPath
public String getPath()
Get the path to the hdf5 file for this partition.- Returns:
- path to the hdf5 file for this partition.
-
getTimepointIdSequenceToPartition
public Map<Integer,Integer> getTimepointIdSequenceToPartition()
Get a map fromtimepoint idsof the full sequence to timepoint ids of this partition.
-
getSetupIdSequenceToPartition
public Map<Integer,Integer> getSetupIdSequenceToPartition()
Get a map fromsetup idsof the full sequence to setup ids of this partition.
-
contains
public boolean contains(mpicbg.spim.data.sequence.ViewId viewId)
Does this partition contain the givenview(timepoint-setup pair)?- Parameters:
viewId- view (timepoint and setup id wrt. the full sequence)- Returns:
- whether this partition contains the given view.
-
split
public static ArrayList<Partition> split(List<mpicbg.spim.data.sequence.TimePoint> timepoints, List<? extends mpicbg.spim.data.generic.sequence.BasicViewSetup> setups, int timepointsPerPartition, int setupsPerPartition, String basename)
Split a sequence into partitions, each containing a specified number of timepoints and setups.- Parameters:
timepoints- list of allTimePoints.setups- list of allBasicViewSetups.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.- Returns:
- list of partitions.
-
-