Package org.anchoranalysis.mpp.index
Class IndexByChannel<T>
Object
IndexByChannel<T>
- Type Parameters:
T
- The type of the voxel partition
An index structure that organizes voxel partitions by channel.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
add
(IndexByRegion<T> e) Adds an IndexByRegion to the channel index.void
cleanUp
(VoxelPartitionFactory<T> factory) Cleans up the voxel partitions for all channels using the provided factory.get
(int index) Gets the IndexByRegion for a specific channel.void
initialize
(VoxelPartitionFactory<T> factory, int numChannel, int numRegions, int numSlices) Initializes the channel index with a specified number of channels, regions, and slices.int
size()
Gets the number of channels in the index.
-
Constructor Details
-
IndexByChannel
public IndexByChannel()
-
-
Method Details
-
add
Adds an IndexByRegion to the channel index.- Parameters:
e
- The IndexByRegion to add- Returns:
- true if the IndexByRegion was successfully added, false otherwise
-
initialize
public void initialize(VoxelPartitionFactory<T> factory, int numChannel, int numRegions, int numSlices) Initializes the channel index with a specified number of channels, regions, and slices.- Parameters:
factory
- The factory to create voxel partitionsnumChannel
- The number of channelsnumRegions
- The number of regions per channelnumSlices
- The number of slices per region
-
get
Gets the IndexByRegion for a specific channel.- Parameters:
index
- The index of the channel- Returns:
- The IndexByRegion for the specified channel
-
size
public int size()Gets the number of channels in the index.- Returns:
- The number of channels
-
cleanUp
Cleans up the voxel partitions for all channels using the provided factory.- Parameters:
factory
- The factory to use for cleanup
-