def getHistogram(self,bins,range,density=True):
        if self._img is None:
            raise ValueError("Img haven't loaded, please call loadImg() first.")

        return np.histogram(self._img.flatten(), bins=bins, range=range, density=density)