final int channelCount = dataParser.getBasicChannelsCount();
final int depth = header.depth;
final MyBitInputStream mbis = new MyBitInputStream(is, ByteOrder.BIG_ENDIAN);
// we want all samples to be bytes
BitsToByteInputStream bbis = null;
boolean canThrow = false;
try {
bbis = new BitsToByteInputStream(mbis, 8);
final int[][][] data = new int[channelCount][height][width];
for (int channel = 0; channel < channelCount; channel++) {
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
final int b = bbis.readBits(depth);
data[channel][y][x] = (byte) b;
}
}
}