Commit 12d6cab3 authored by Duggan, John's avatar Duggan, John
Browse files

Flush logging statements immediately

parent 726edf23
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
[tool.poetry]
name = "ctscan-viz"
version = "0.2.0"
version = "0.2.1"
description = "Template application"
authors = []
readme = "README.md"
+4 −4
Original line number Diff line number Diff line
@@ -69,17 +69,17 @@ class VisualizationPanel:
            else:
                scalars = np.concatenate((scalars, slice.active_scalars))
            z_range += 1
            print(f"Processed slice {z_range}/{len(file_list)} in {time.time() - slice_start:.2f}s")
        print(f"Numpy array creation: {time.time() - start:.2f}s")
            print(f"Processed slice {z_range}/{len(file_list)} in {time.time() - slice_start:.2f}s", flush=True)
        print(f"Numpy array creation: {time.time() - start:.2f}s", flush=True)

        start = time.time()
        # Define the 3D volume's extent
        volume = ImageData(dimensions=(x_range, y_range, z_range), origin=(0, 0, 0), spacing=(1, 1, 1))
        # Define the 3D volume's scalars for the color/opacity transfer functions
        volume["TIFF Scalars"] = scalars
        print(f"PyVista volume creation: {time.time() - start:.2f}s")
        print(f"PyVista volume creation: {time.time() - start:.2f}s", flush=True)

        start = time.time()
        self.plotter.add_volume(volume, opacity="sigmoid")
        self.plotter.view_isometric(self.plotter)
        print(f"PyVista volume rendering: {time.time() - start:.2f}s")
        print(f"PyVista volume rendering: {time.time() - start:.2f}s", flush=True)