Plane2D plane2D = Helper.createPlane(pd, index, metadata, pixelsData);
Plane2D plane2D = PlaneFactory.createPlane(pd, index, metadata, pixelsData);
    public void computeLocationStats(Pixels metadata, PixelBuffer pixelsData,                                      PlaneDef pd, int index)    {    	int sizeX = metadata.getSizeX().intValue();    	int sizeY = metadata.getSizeY().intValue();    	Channel channel = (Channel) metadata.getChannels().get(index);    	StatsInfo stats = channel.getStatsInfo();    	double gMin = stats.getGlobalMin().doubleValue();    	double gMax = stats.getGlobalMax().doubleValue();    	Plane2D plane2D = Helper.createPlane(pd, index, metadata, pixelsData);    	if (gMax - gMin >= NB_BIN)     		computeBins(plane2D, stats, sizeY, sizeX);    }