@Test(dependsOnMethods={"testSetId"})
public void testPlaneData() throws FormatException, IOException {
for (int i=0; i<pixelsOnly.getSeriesCount(); i++) {
pixelsOnly.setSeries(i);
all.setSeries(i);
noOverlays.setSeries(i);
assertEquals(all.getImageCount(), pixelsOnly.getImageCount());
assertEquals(all.getImageCount(), noOverlays.getImageCount());
for (int j=0; j<pixelsOnly.getImageCount(); j++) {
byte[] pixelsOnlyPlane = pixelsOnly.openBytes(j);
String pixelsOnlySHA1 = sha1(pixelsOnlyPlane);
byte[] allPlane = all.openBytes(j);
String allSHA1 = sha1(allPlane);
byte[] noOverlaysPlane = noOverlays.openBytes(j);
String noOverlaysSHA1 = sha1(noOverlaysPlane);
if (!pixelsOnlySHA1.equals(allSHA1)) {
fail(String.format("MISMATCH: Series:%d Image:%d PixelsOnly%s All:%s",
i, j, pixelsOnlySHA1, allSHA1));
}
if (!noOverlaysSHA1.equals(allSHA1)) {
fail(String.format("MISMATCH: Series:%d Image:%d PixelsOnly%s All:%s",
i, j, noOverlaysSHA1, allSHA1));
}
}
}
}