Created
September 8, 2021 17:41
-
-
Save tfmoraes/9fb1bb7592bae0db77e21a9c782db429 to your computer and use it in GitHub Desktop.
brainmesh_handler
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/invesalius/data/brainmesh_handler.py b/invesalius/data/brainmesh_handler.py | |
index 172b3c3a..a6f6732b 100644 | |
--- a/invesalius/data/brainmesh_handler.py | |
+++ b/invesalius/data/brainmesh_handler.py | |
@@ -33,6 +33,8 @@ class Brain: | |
tmpPeel = downsample(refSurface) | |
# Standard space coordinates | |
mask_sFormMatrix = mask_reader.GetSFormMatrix() | |
+ if mask_sFormMatrix is None: | |
+ mask_sFormMatrix = vtk.vtkMatrix4x4() | |
# Apply coordinate transform to the meshed mask | |
mask_ijk2xyz = vtk.vtkTransform() | |
@@ -58,6 +60,8 @@ class Brain: | |
# Scanner coordinates from image | |
qFormMatrix = T1_reader.GetQFormMatrix() | |
+ if qFormMatrix is None: | |
+ qFormMatrix = vtk.vtkMatrix4x4() | |
refImageSpace2_xyz_transform = vtk.vtkTransform() | |
refImageSpace2_xyz_transform.SetMatrix(qFormMatrix) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment