Package org.anchoranalysis.test.image
Class ChannelFixture
Object
org.anchoranalysis.test.image.ChannelFixture
public class ChannelFixture extends Object
Creates a
Channel to use in tests.- Author:
- Owen Feehan
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceChannelFixture.IntensityFunctionFunctional interface for creating intensity values for a given location. -
Field Summary
Fields Modifier and Type Field Description static ExtentLARGE_2DLarge 2D extent for testing.static ExtentLARGE_3DLarge 3D extent for testing.static ExtentMEDIUM_2DMedium 2D extent for testing.static ExtentMEDIUM_3DMedium 3D extent for testing.static ExtentSMALL_2DSmall 2D extent for testing.static ExtentSMALL_3DSmall 3D extent for testing. -
Constructor Summary
Constructors Constructor Description ChannelFixture()ChannelFixture(boolean includeResolution) -
Method Summary
Modifier and Type Method Description ChannelcreateChannel(Extent extent, ChannelFixture.IntensityFunction createIntensity, org.anchoranalysis.image.voxel.datatype.VoxelDataType channelVoxelType)Creates a channel with specified extent, intensity function, and voxel data type.static intdiffModulo(int x, int y, int z)Calculates intensity as the difference of coordinates modulo 256.static intmultModulo(int x, int y, int z)Calculates intensity as the product of coordinates modulo 256.static intsumModulo(int x, int y, int z)Calculates intensity as the sum of coordinates modulo 256.
-
Field Details
-
Constructor Details
-
ChannelFixture
public ChannelFixture() -
ChannelFixture
public ChannelFixture(boolean includeResolution)
-
-
Method Details
-
sumModulo
public static int sumModulo(int x, int y, int z)Calculates intensity as the sum of coordinates modulo 256.- Parameters:
x- The x-coordinate.y- The y-coordinate.z- The z-coordinate.- Returns:
- The calculated intensity.
-
diffModulo
public static int diffModulo(int x, int y, int z)Calculates intensity as the difference of coordinates modulo 256.- Parameters:
x- The x-coordinate.y- The y-coordinate.z- The z-coordinate.- Returns:
- The calculated intensity.
-
multModulo
public static int multModulo(int x, int y, int z)Calculates intensity as the product of coordinates modulo 256.- Parameters:
x- The x-coordinate.y- The y-coordinate.z- The z-coordinate.- Returns:
- The calculated intensity.
-
createChannel
public Channel createChannel(Extent extent, ChannelFixture.IntensityFunction createIntensity, org.anchoranalysis.image.voxel.datatype.VoxelDataType channelVoxelType)Creates a channel with specified extent, intensity function, and voxel data type.- Parameters:
extent- The extent of the channel.createIntensity- The function to create intensity values.channelVoxelType- The voxel data type of the channel.- Returns:
- The created channel.
-