Skip to content

Commit 072ce05

Browse files
committed
fix: remove diffusionsummary
1 parent fb9a635 commit 072ce05

File tree

3 files changed

+1
-63
lines changed

3 files changed

+1
-63
lines changed

dmriprep/config/reports-spec.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ sections:
2929
- name: Diffusion
3030
ordering: session,acquisition,run
3131
reportlets:
32-
- bids: {datatype: dwi, desc: summary, suffix: dwi}
3332
- bids: {datatype: dwi, desc: validation, suffix: dwi}
3433
- name: About
3534
reportlets:

dmriprep/interfaces/reports.py

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@
2323
\t</ul>
2424
"""
2525

26-
DWI_TEMPLATE = """\t\t<h3 class="elem-title">Summary</h3>
27-
\t\t<ul class="elem-desc">
28-
\t\t\t<li>Susceptibility distortion correction: {sdc}</li>
29-
\t\t\t<li>Registration: {registration}</li>
30-
\t\t</ul>
31-
"""
32-
3326
ABOUT_TEMPLATE = """\t<ul>
3427
\t\t<li>dMRIPrep version: {version}</li>
3528
\t\t<li>dMRIPrep command: <code>{command}</code></li>
@@ -128,39 +121,3 @@ def _generate_segment(self):
128121
return ABOUT_TEMPLATE.format(version=self.inputs.version,
129122
command=self.inputs.command,
130123
date=time.strftime("%Y-%m-%d %H:%M:%S %z"))
131-
132-
133-
class DiffusionSummaryInputSpec(BaseInterfaceInputSpec):
134-
distortion_correction = traits.Str(desc='Susceptibility distortion correction method',
135-
mandatory=True)
136-
pe_direction = traits.Enum(None, 'i', 'i-', 'j', 'j-', mandatory=True,
137-
desc='Phase-encoding direction detected')
138-
registration = traits.Enum('FSL', 'FreeSurfer', mandatory=True,
139-
desc='Diffusion/anatomical registration method')
140-
fallback = traits.Bool(desc='Boundary-based registration rejected')
141-
registration_dof = traits.Enum(6, 9, 12, desc='Registration degrees of freedom',
142-
mandatory=True)
143-
144-
145-
class DiffusionSummary(SummaryInterface):
146-
input_spec = DiffusionSummaryInputSpec
147-
148-
def _generate_segment(self):
149-
dof = self.inputs.registration_dof
150-
reg = {
151-
'FSL': [
152-
'FSL <code>flirt</code> with boundary-based registration'
153-
' (BBR) metric - %d dof' % dof,
154-
'FSL <code>flirt</code> rigid registration - 6 dof'],
155-
'FreeSurfer': [
156-
'FreeSurfer <code>bbregister</code> '
157-
'(boundary-based registration, BBR) - %d dof' % dof,
158-
'FreeSurfer <code>mri_coreg</code> - %d dof' % dof],
159-
}[self.inputs.registration][self.inputs.fallback]
160-
if self.inputs.pe_direction is None:
161-
pedir = 'MISSING - Assuming Anterior-Posterior'
162-
else:
163-
pedir = {'i': 'Left-Right', 'j': 'Anterior-Posterior'}[self.inputs.pe_direction[0]]
164-
165-
return DWI_TEMPLATE.format(
166-
pedir=pedir, sdc=self.inputs.distortion_correction, registration=reg)

dmriprep/workflows/dwi/base.py

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
from ...config import DEFAULT_MEMORY_MIN_GB
1111

1212
from ...interfaces import DerivativesDataSink
13-
from ...interfaces.reports import DiffusionSummary
1413
from ...interfaces.vectors import CheckGradientTable
1514

1615

@@ -125,13 +124,9 @@ def init_dwi_preproc_wf(
125124
LOGGER.log(25, 'No valid layout: building empty workflow.')
126125
bvec_file = '/completely/made/up/path/sub-01_dwi.bvec'
127126
bval_file = '/completely/made/up/path/sub-01_dwi.bval'
128-
metadata = {
129-
'PhaseEncodingDirection': 'j',
130-
}
131127
else:
132128
bvec_file = layout.get_bvec(dwi_file)
133129
bval_file = layout.get_bval(dwi_file)
134-
metadata = layout.get_metadata(dwi_file)
135130

136131
inputnode = pe.Node(niu.IdentityInterface(
137132
fields=['dwi_file', 'bvec_file', 'bval_file',
@@ -150,12 +145,6 @@ def init_dwi_preproc_wf(
150145
'out_dwi_mask']),
151146
name='outputnode')
152147

153-
summary = pe.Node(
154-
DiffusionSummary(
155-
distortion_correction='Not implemented',
156-
pe_direction=metadata.get("PhaseEncodingDirection")),
157-
name='summary', mem_gb=DEFAULT_MEMORY_MIN_GB, run_without_submitting=True)
158-
159148
gradient_table = pe.Node(CheckGradientTable(), name='gradient_table')
160149

161150
dwi_reference_wf = init_dwi_reference_wf(omp_nthreads=1, gen_report=True)
@@ -178,21 +167,14 @@ def init_dwi_preproc_wf(
178167
])
179168

180169
# REPORTING
181-
ds_report_summary = pe.Node(
182-
DerivativesDataSink(desc='summary', keep_dtype=True),
183-
name='ds_report_summary', run_without_submitting=True,
184-
mem_gb=DEFAULT_MEMORY_MIN_GB
185-
)
186-
187170
ds_report_validation = pe.Node(
188171
DerivativesDataSink(base_directory=reportlets_dir,
189172
desc='validation', keep_dtype=True),
190173
name='ds_report_validation', run_without_submitting=True,
191174
mem_gb=DEFAULT_MEMORY_MIN_GB)
192175

193176
workflow.connect([
194-
(inputnode, ds_report_summary, [('dwi_file', 'source_file')]),
195-
(summary, ds_report_summary, [('out_report', 'in_file')]),
177+
(inputnode, ds_report_validation, [('dwi', 'source_file')]),
196178
(dwi_reference_wf, ds_report_validation, [
197179
('outputnode.validation_report', 'in_file')]),
198180
])

0 commit comments

Comments
 (0)