Skip to content

Commit 435294e

Browse files
committed
Added warning message when segmentation is off
1 parent 2f5b2aa commit 435294e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CPAC/nuisance/utils/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,16 @@
77
import nipype.interfaces.utility as util
88
from CPAC.pipeline import nipype_pipeline_engine as pe
99
from nipype.interfaces import afni
10+
from nipype import logging
1011

1112
from CPAC.nuisance.utils.compcor import calc_compcor_components
1213
from CPAC.nuisance.utils.crc import encode as crc_encode
1314
from CPAC.utils.interfaces.fsl import Merge as fslMerge
1415
from CPAC.utils.interfaces.function import Function
1516
from CPAC.registration.utils import check_transforms, generate_inverse_transform_flags
1617

18+
logger = logging.getLogger('nipype.workflow')
19+
1720

1821
def find_offending_time_points(fd_j_file_path=None, fd_p_file_path=None, dvars_file_path=None,
1922
fd_j_threshold=None, fd_p_threshold=None, dvars_threshold=None,
@@ -403,6 +406,10 @@ def generate_summarize_tissue_mask_ventricles_masking(nuisance_wf,
403406
use_ants=True,
404407
ventricle_mask_exist=True):
405408

409+
if csf_mask_exist == False:
410+
logger.warning('Segmentation is Off, - therefore will be using '
411+
'lateral_ventricle_mask as CerebrospinalFluid_mask.')
412+
406413
# Mask CSF with Ventricles
407414
if '{}_Unmasked'.format(mask_key) not in pipeline_resource_pool:
408415

0 commit comments

Comments
 (0)