Class ImageFileEncoding
Object
ImageFileEncoding
How values are encoded into an image-file.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionImageFileEncoding
(boolean rgb, boolean interleaved, int numberChannelsPerArray) Creates a newImageFileEncoding
instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
The total number of channels found in any one buffer.int
hashCode()
boolean
Whether the channels are interleavedboolean
isRgb()
Whether the source bytes encoded as RGB (i.e. with the three colors coded into a 4 bytes coding per voxel).int
When RGB-encoded and non-interleaved, the source array is considered 1 channel (not three).toString()
-
Constructor Details
-
ImageFileEncoding
public ImageFileEncoding(boolean rgb, boolean interleaved, int numberChannelsPerArray) Creates a newImageFileEncoding
instance.- Parameters:
rgb
- Whether the source bytes encoded as RGB (i.e. with the three colors coded into a 4 bytes coding per voxel).interleaved
- Whether the channels are interleavedInterleaving means that voxels from successive channels are directly adjacent. Otherwise, each channel's voxels are contiguous.
numberChannelsPerArray
- The total number of channels found in any one buffer.For an RGB image, this is by definition three.
-
-
Method Details
-
numberDistinctChannelsSource
When RGB-encoded and non-interleaved, the source array is considered 1 channel (not three).When not RGB encoded, it describes the number of interleaved channels present.
- Returns:
- the number of channels as per above, which must always be positive.
- Throws:
IOException
- if numberChannelsPerArray is zero, and the image is either non-RGB or interleaved.
-
isRgb
public boolean isRgb()Whether the source bytes encoded as RGB (i.e. with the three colors coded into a 4 bytes coding per voxel). -
isInterleaved
public boolean isInterleaved()Whether the channels are interleavedInterleaving means that voxels from successive channels are directly adjacent. Otherwise, each channel's voxels are contiguous.
-
getNumberChannelsPerArray
public int getNumberChannelsPerArray()The total number of channels found in any one buffer.For an RGB image, this is by definition three.
-
equals
-
hashCode
public int hashCode() -
toString
-