예제 #1
0
    def setUpClass(cls):
        path_in = path_image_samples / cls.name / "Images"

        cls._work_dir = Path("test_topo_preproc_" + cls.name) / "Images"
        cls._work_dir.mkdir(parents=True, exist_ok=True)

        paths = path_in.glob("*")

        for path in paths:
            name = path.name
            im = imread(path)
            im = im[::6, ::6]
            imsave(str(cls._work_dir / name), im, as_int=True)
예제 #2
0
    def setUpClass(cls):
        path_in = str(path_image_samples / cls.name / "Images")

        cls._work_dir = os.path.join(
            "test_fluidimage_topo_preproc_" + cls.name, "Images")
        if not os.path.exists(cls._work_dir):
            os.makedirs(cls._work_dir)

        paths = glob(path_in + "/*")

        for path in paths:
            name = os.path.split(path)[-1]
            im = imread(path)
            im = im[::6, ::6]
            imsave(os.path.join(cls._work_dir, name), im, as_int=True)
예제 #3
0
def save(d):
    log("save")
    k, v = d
    path = "/home/users/vishnu1as/src/fluidimage-cornic/try" + os.path.basename(k)
    imsave(path, v)
    return
예제 #4
0
 def save_image(self, tuple_image_path):
     image, path = tuple_image_path
     name_file = Path(path).name
     path_out = self.path_dir_result / name_file
     imsave(path_out, image)