@@ -671,9 +671,9 @@ def _do_subject_segment(subject_data, output_modulated_tpms=True, spm_dir=None,
671671 return subject_data .sanitize ()
672672
673673
674- def _do_subject_newsegment (subject_data , output_modulated_tpms = True ,
674+ def _do_subject_newsegment (subject_data ,
675675 spm_dir = None , matlab_exec = None , spm_mcr = None ,
676- normalize = False , caching = True , report = True ,
676+ caching = True , report = True ,
677677 software = "spm" , hardlink_output = True ):
678678 """
679679 Wrapper for running spm.NewSegment with optional reporting.
@@ -687,17 +687,9 @@ def _do_subject_newsegment(subject_data, output_modulated_tpms=True,
687687 subject data whose anatomical image (subject_data.anat) is to be
688688 segmented
689689
690- output_modulated_tpms: bool, optional (default False)
691- if set, then modulated TPMS will be produced (alongside unmodulated
692- TPMs); this can be useful for VBM
693-
694690 caching: bool, optional (default True)
695691 if true, then caching will be enabled
696692
697- normalize: bool, optional (default False)
698- flag indicating whether warped brain compartments (gm, wm, csf) are to
699- be generated (necessary if the caller wishes the brain later)
700-
701693 report: bool, optional (default True)
702694 flag controlling whether post-preprocessing reports should be generated
703695
@@ -762,15 +754,6 @@ def _do_subject_newsegment(subject_data, output_modulated_tpms=True,
762754 else :
763755 segment = spm .NewSegment ().run
764756
765- # configure node
766- if not normalize :
767- gm_output_type = [False , False , True ]
768- wm_output_type = [False , False , True ]
769- csf_output_type = [False , False , True ]
770- else :
771- gm_output_type = [output_modulated_tpms , True , True ]
772- wm_output_type = [output_modulated_tpms , True , True ]
773- csf_output_type = [output_modulated_tpms , True , True ]
774757 # run node
775758 segment_result = segment (
776759 channel_files = subject_data .anat ,
@@ -793,10 +776,10 @@ def _do_subject_newsegment(subject_data, output_modulated_tpms=True,
793776 subject_data .gm = segment_result .outputs .native_class_images [0 ][0 ]
794777 subject_data .wm = segment_result .outputs .native_class_images [1 ][0 ]
795778 subject_data .csf = segment_result .outputs .native_class_images [2 ][0 ]
796- if normalize :
797- subject_data .mwgm = segment_result .outputs .modulated_class_images [0 ][0 ]
798- subject_data .mwwm = segment_result .outputs .modulated_class_images [1 ][0 ]
799- subject_data .mwcsf = segment_result .outputs .modulated_class_images [2 ][0 ]
779+
780+ subject_data .mwgm = segment_result .outputs .modulated_class_images [0 ][0 ]
781+ subject_data .mwwm = segment_result .outputs .modulated_class_images [1 ][0 ]
782+ subject_data .mwcsf = segment_result .outputs .modulated_class_images [2 ][0 ]
800783
801784 # commit output files
802785 if hardlink_output :
@@ -1506,7 +1489,7 @@ def do_subject_preproc(
15061489 # newsegment goes here
15071490 if newsegment :
15081491 subject_data = _do_subject_newsegment (
1509- subject_data , caching = caching , normalize = normalize ,
1492+ subject_data , caching = caching ,
15101493 report = report , hardlink_output = hardlink_output )
15111494 else :
15121495 subject_data = _do_subject_segment (
0 commit comments