def __getitem__(self, index):
        if isinstance (index, (int, long)):
            return self.get_row(index)
        elif isinstance(index, slice):
            return self.get_image()[index]
        elif isinstance(index, tuple):
            if len(index)==0:
                return self.get_image()
            if len(index)==1:
                return self[index[0]]
            index0 = index[0]
            if isinstance(index0, (int, long)):
                return self.get_row(index0, index[1:])
            return self.get_image()[index]
        raise NotImplementedError (`index`)
dataset/ETHPy150Open pearu/pylibtiff/libtiff/tiff_sample_plane.py/TiffSamplePlane.__getitem__/original