I just noticed that when using an ImagePlus from IJ1 and you get the number of pixels, the current slice from the stack is automatically chosen to be analyzed. But with ImgPlus from IJ2, when getting its size(), it returns the sum of pixels of all the images in the stack. Same happens when analyzing the histogram through code.
I know you can get a specific slice through Views.hyperSlice(), but how would you achieve getting the current slice the user is working on? Also out of curiosity, what was the reason for this change?