@@ -21,6 +21,10 @@ class _FieldmapReportletInputSpec(reporting.ReportCapableInputSpec):
21
21
desc = 'filename for the visual report' )
22
22
show = traits .Enum (1 , 0 , 'both' , usedefault = True ,
23
23
desc = 'where the fieldmap should be shown' )
24
+ reference_label = traits .Str ('Reference' , usedefault = True ,
25
+ desc = 'a label name for the reference mosaic' )
26
+ moving_label = traits .Str ('Fieldmap (Hz)' , usedefault = True ,
27
+ desc = 'a label name for the reference mosaic' )
24
28
25
29
26
30
class FieldmapReportlet (reporting .ReportCapableInterface ):
@@ -42,9 +46,12 @@ def _generate_report(self):
42
46
"""Generate a reportlet."""
43
47
NIWORKFLOWS_LOG .info ('Generating visual report' )
44
48
45
- refnii = load_img (self .inputs .reference )
49
+ movnii = refnii = load_img (self .inputs .reference )
46
50
fmapnii = load_img (self .inputs .fieldmap )
47
51
52
+ if isdefined (self .inputs .moving ):
53
+ movnii = load_img (self .inputs .moving )
54
+
48
55
contour_nii = mask_nii = None
49
56
if isdefined (self .inputs .mask ):
50
57
contour_nii = load_img (self .inputs .mask )
@@ -71,17 +78,17 @@ def _generate_report(self):
71
78
72
79
# Call composer
73
80
compose_view (
74
- plot_registration (refnii , 'moving-image' ,
81
+ plot_registration (movnii , 'moving-image' ,
75
82
estimate_brightness = True ,
76
83
cuts = cuts ,
77
- label = 'fieldmap (Hz)' ,
84
+ label = self . inputs . moving_label ,
78
85
contour = contour_nii ,
79
86
compress = False ,
80
87
** fmap_overlay [1 ]),
81
88
plot_registration (refnii , 'fixed-image' ,
82
89
estimate_brightness = True ,
83
90
cuts = cuts ,
84
- label = 'reference' ,
91
+ label = self . inputs . reference_label ,
85
92
contour = contour_nii ,
86
93
compress = False ,
87
94
** fmap_overlay [0 ]),
0 commit comments