(self, compress=True)
| 389 | print(self.resamplerFilter.GetOutput()) |
| 390 | |
| 391 | def stop(self, compress=True): |
| 392 | # Push metadata |
| 393 | self.dataHandler.addSection("DataProber", self.DataProber) |
| 394 | |
| 395 | # Write metadata |
| 396 | DataSetBuilder.stop(self) |
| 397 | |
| 398 | if compress: |
| 399 | for root, dirs, files in os.walk(self.dataHandler.getBasePath()): |
| 400 | print("Compress", root) |
| 401 | for name in files: |
| 402 | if ".array" in name and ".gz" not in name: |
| 403 | with open(os.path.join(root, name), "rb") as f_in: |
| 404 | with gzip.open( |
| 405 | os.path.join(root, name + ".gz"), "wb" |
| 406 | ) as f_out: |
| 407 | shutil.copyfileobj(f_in, f_out) |
| 408 | os.remove(os.path.join(root, name)) |
| 409 | |
| 410 | |
| 411 | # ----------------------------------------------------------------------------- |
nothing calls this directly
no test coverage detected