}
byte[][] getOverlay(ImagePlus imp) {
if (imp.getHideOverlay())
return null;
Overlay overlay = imp.getOverlay();
if (overlay==null) {
ImageCanvas ic = imp.getCanvas();
if (ic==null) return null;
overlay = ic.getShowAllList(); // ROI Manager "Show All" list
if (overlay==null) return null;
}
int n = overlay.size();
if (n==0) return null;
if (Orthogonal_Views.isOrthoViewsImage(imp))
return null;
byte[][] array = new byte[n][];
for (int i=0; i<overlay.size(); i++) {
Roi roi = overlay.get(i);
array[i] = RoiEncoder.saveAsByteArray(roi);
}
return array;
}