From 62ac13c956ab60f74c0002602f80bd93aab7dd8b Mon Sep 17 00:00:00 2001 From: robinroy03 Date: Fri, 22 Mar 2024 00:34:45 +0530 Subject: [PATCH] fixed the normal directions (it now points outwards, earlier it pointed inwards. This might affect if we introduce some optimizations), also some minor QOL changes. Deleted vtkprop because it was unused, it was introduced previously but now it is not needed --- fury/actor.py | 11 ++++------- fury/lib.py | 2 -- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/fury/actor.py b/fury/actor.py index 7268da7c6..68cfbac0a 100644 --- a/fury/actor.py +++ b/fury/actor.py @@ -3997,8 +3997,8 @@ def texture_on_cube(negx, negy, negz, posx, posy, posz, centers=(0, 0, 0)): """ plane_objects = [PlaneSource() for _ in range(6)] - center_x, center_y, center_z = centers + center_x, center_y, center_z = centers plane_centers = [ (-0.5 + center_x, 0 + center_y, 0 + center_z), (0 + center_x, -0.5 + center_y, 0 + center_z), @@ -4009,9 +4009,9 @@ def texture_on_cube(negx, negy, negz, posx, posy, posz, centers=(0, 0, 0)): ] plane_normals = [ - (1, 0, 0), - (0, 1, 0), - (0, 0, 1), + (-1, 0, 0), + (0, -1, 0), + (0, 0, -1), (1, 0, 0), (0, 1, 0), (0, 0, 1) @@ -4026,13 +4026,11 @@ def texture_on_cube(negx, negy, negz, posx, posy, posz, centers=(0, 0, 0)): plane.SetNormal(*normal) image_grids = [negx, negy, negz, posx, posy, posz] - image_data_objects = [ numpy_to_vtk_image_data(grid) for grid in image_grids ] texture_objects = [Texture() for _ in range(6)] - for image_data, texture in zip( image_data_objects, texture_objects @@ -4040,7 +4038,6 @@ def texture_on_cube(negx, negy, negz, posx, posy, posz, centers=(0, 0, 0)): texture.SetInputDataObject(image_data) polydatamapper_objects = [PolyDataMapper() for _ in range(6)] - for mapper, plane in zip( polydatamapper_objects, plane_objects diff --git a/fury/lib.py b/fury/lib.py index 1adb93e39..b780bd268 100644 --- a/fury/lib.py +++ b/fury/lib.py @@ -101,8 +101,6 @@ WindowToImageFilter = rcvtk.vtkWindowToImageFilter #: class for InteractorStyle InteractorStyle = rcvtk.vtkInteractorStyle -#: class for PropCollection -PropCollection = rcvtk.vtkPropCollection #: class for PropPicker PropPicker = rcvtk.vtkPropPicker #: class for PointPicker