/** Finds the Plane index corresponding to the given image plane number. */ private static int getPlaneIndex(IFormatReader r, int no) { MetadataRetrieve retrieve = (MetadataRetrieve) r.getMetadataStore(); int imageIndex = r.getSeries(); int planeCount = retrieve.getPlaneCount(imageIndex); int[] zct = r.getZCTCoords(no); for (int i=0; i<planeCount; i++) { Integer theC = retrieve.getPlaneTheC(imageIndex, i).getValue(); Integer theT = retrieve.getPlaneTheT(imageIndex, i).getValue(); Integer theZ = retrieve.getPlaneTheZ(imageIndex, i).getValue(); if (zct[0] == theZ.intValue() && zct[1] == theC.intValue() && zct[2] == theT.intValue()) { return i; } } return -1; }
/** Finds the Plane index corresponding to the given image plane number. */ private static int getPlaneIndex(IFormatReader r, int no) { MetadataRetrieve retrieve = (MetadataRetrieve) r.getMetadataStore(); int imageIndex = r.getSeries(); int planeCount = retrieve.getPlaneCount(imageIndex); int[] zct = r.getZCTCoords(no); for (int i=0; i<planeCount; i++) { Integer theC = retrieve.getPlaneTheC(imageIndex, i).getValue(); Integer theT = retrieve.getPlaneTheT(imageIndex, i).getValue(); Integer theZ = retrieve.getPlaneTheZ(imageIndex, i).getValue(); if (zct[0] == theZ.intValue() && zct[1] == theC.intValue() && zct[2] == theT.intValue()) { return i; } } return -1; }
for ( int p = 0; p < planeCount; ++p ) final int theZ = retrieve.getPlaneTheZ( series, p ).getValue(); final int theC = retrieve.getPlaneTheC( series, p ).getValue(); final int theT = retrieve.getPlaneTheT( series, p ).getValue();
deltaT = retrieve.getPlaneDeltaT(i, 0); exposure = retrieve.getPlaneExposureTime(i, 0); z = retrieve.getPlaneTheZ(i, 0).getValue(); c = retrieve.getPlaneTheC(i, 0).getValue(); t = retrieve.getPlaneTheT(i, 0).getValue();