File tree Expand file tree Collapse file tree
src/cardiotensor/orientation Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import os
44import sys
55import time
6+ import warnings
67from collections .abc import Sequence
78
89import numpy as np
@@ -173,7 +174,7 @@ def compute_orientation(
173174 truncate: Gaussian kernel truncation.
174175 axis_points: 3D points defining LV axis for cylindrical coordinates.
175176 vertical_padding: Padding slices for tensor computation.
176- write_vectors: Whether to save eigenvectors.
177+ write_vectors: Whether to save eigenvectors. Ignored in test mode.
177178 write_angles: Whether to save HA/IA/FA maps.
178179 use_gpu: Use GPU acceleration for tensor computation.
179180 is_test: If True, runs in test mode and outputs plots.
@@ -195,6 +196,16 @@ def compute_orientation(
195196 else :
196197 raise ValueError ("ANGLE_MODE must be 'ha_ia' or 'az_el'" )
197198
199+ if is_test and write_vectors :
200+ warnings .warn (
201+ "WRITE_VECTORS=True has no effect when is_test=True; "
202+ "vector fields are not written in test mode. "
203+ "Proceeding with write_vectors=False." ,
204+ UserWarning ,
205+ stacklevel = 2 ,
206+ )
207+ write_vectors = False
208+
198209 print (f"""
199210Parameters:
200211 - Volume path: { volume_path }
You can’t perform that action at this time.
0 commit comments