We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e944f98 commit 2129b21Copy full SHA for 2129b21
petprep/workflows/pet/base.py
@@ -399,9 +399,7 @@ def init_pet_wf(
399
('t1w_tpms', 'inputnode.t1w_tpms'),
400
('subjects_dir', 'inputnode.subjects_dir'),
401
('subject_id', 'inputnode.subject_id'),
402
- ]),
403
- (pet_fit_wf, pet_pvc_wf, [
404
- ('outputnode.segmentation', 'inputnode.segmentation'),
+ ('segmentation', 'inputnode.segmentation'),
405
]),
406
(petref_t1w, pet_pvc_wf, [('output_image', 'inputnode.petref')]),
407
(pet_pvc_wf, psf_meta, [
@@ -719,9 +717,9 @@ def init_pet_wf(
719
717
720
718
workflow.connect([
721
(pet_t1w_src, pet_tacs_wf, [(pet_t1w_field, 'inputnode.pet_anat')]),
722
- (pet_fit_wf, pet_tacs_wf, [
723
724
- ('outputnode.dseg_tsv', 'inputnode.dseg_tsv'),
+ (inputnode, pet_tacs_wf, [
+ ('dseg_tsv', 'inputnode.dseg_tsv'),
725
726
(pet_tacs_wf, ds_pet_tacs, [('outputnode.timeseries', 'in_file')]),
727
]) # fmt:skip
petprep/workflows/pet/fit.py
@@ -119,10 +119,6 @@ def init_pet_fit_wf(
119
petref2anat_xfm
120
Affine transform mapping from PET reference space to the anatomical
121
space.
122
- segmentation
123
- Segmentation file in T1w space
124
- dseg_tsv
125
- TSV with segmentation statistics
126
127
See Also
128
--------
@@ -191,8 +187,6 @@ def init_pet_fit_wf(
191
187
'pet_mask',
192
188
'motion_xfm',
193
189
'petref2anat_xfm',
194
- 'segmentation',
195
- 'dseg_tsv',
196
190
'refmask',
197
],
198
),
@@ -201,11 +195,6 @@ def init_pet_fit_wf(
201
202
# If all derivatives exist, inputnode could go unconnected, so add explicitly
203
workflow.add_nodes([inputnode])
204
- workflow.connect(
205
- [
206
- (inputnode, outputnode, [('segmentation', 'segmentation'), ('dseg_tsv', 'dseg_tsv')]),
207
- ]
208
- )
209
210
199
petref_buffer = pe.Node(
211
200
niu.IdentityInterface(fields=['petref', 'pet_file']),
petprep/workflows/pet/tests/test_base.py
@@ -205,8 +205,8 @@ def test_pvc_receives_segmentation(bids_root: Path):
wf = init_pet_wf(pet_series=pet_series, precomputed={})
- edge = wf._graph.get_edge_data(wf.get_node('pet_fit_wf'), wf.get_node('pet_pvc_wf'))
- assert ('outputnode.segmentation', 'inputnode.segmentation') in edge['connect']
+ edge = wf._graph.get_edge_data(wf.get_node('inputnode'), wf.get_node('pet_pvc_wf'))
+ assert ('segmentation', 'inputnode.segmentation') in edge['connect']
212
def test_pet_tacs_wf_connections(bids_root: Path):
@@ -226,9 +226,9 @@ def test_pet_tacs_wf_connections(bids_root: Path):
226
edge_anat = wf._graph.get_edge_data(wf.get_node('pet_anat_wf'), wf.get_node('pet_tacs_wf'))
227
assert ('outputnode.pet_file', 'inputnode.pet_anat') in edge_anat['connect']
228
229
- edge_fit = wf._graph.get_edge_data(wf.get_node('pet_fit_wf'), wf.get_node('pet_tacs_wf'))
230
- assert ('outputnode.segmentation', 'inputnode.segmentation') in edge_fit['connect']
231
- assert ('outputnode.dseg_tsv', 'inputnode.dseg_tsv') in edge_fit['connect']
+ edge_input = wf._graph.get_edge_data(wf.get_node('inputnode'), wf.get_node('pet_tacs_wf'))
+ assert ('segmentation', 'inputnode.segmentation') in edge_input['connect']
+ assert ('dseg_tsv', 'inputnode.dseg_tsv') in edge_input['connect']
232
233
edge_ds = wf._graph.get_edge_data(wf.get_node('pet_tacs_wf'), wf.get_node('ds_pet_tacs'))
234
assert ('outputnode.timeseries', 'in_file') in edge_ds['connect']
0 commit comments