def test_seammarker_sliceOnPointIsUpToTrueColSliceFalse(self): demot = self.loadImageRow() points = getPointListFromPointPath(self.points_left_path) point = points[0] slicer = PointSlicer(point, demot) rowslice = slicer.sliceOnPoint(thresh=5, isUpTo=True, colSlice=False) rowslice = rowslice[0] compimg = os.path.join(self.imagedir, 'rowslice.png') compimg = np.array(Image.open(compimg)) self.compareArrays(rowslice, compimg, "row slice is not the same for sliced image")
def test_seammarker_sliceOnPointIsUpToFalseColSliceTrue(self): viet = self.loadImageCol() points = getPointListFromPointPath(self.points_down_path) point = points[0] slicer = PointSlicer(point, viet) colslice = slicer.sliceOnPoint(thresh=5, isUpTo=False, colSlice=True) # pdb.set_trace() colslice = colslice[0] compimg = os.path.join(self.imagedir, 'colslice.png') compimg = np.array(Image.open(compimg)) self.compareArrays(colslice, compimg, "column slice is not the same for sliced image")