Skip to content

Commit 4920bcb

Browse files
committed
sty(black): run black on the whole viz module
1 parent 6070de4 commit 4920bcb

File tree

4 files changed

+642
-391
lines changed

4 files changed

+642
-391
lines changed

niworkflows/viz/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
from .plots import plot_carpet
44
from .utils import SVGNS
55

6-
__all__ = ['plot_carpet', 'SVGNS']
6+
__all__ = ["plot_carpet", "SVGNS"]

niworkflows/viz/notebook.py

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ def display(
1515
):
1616
"""Plot the flickering panels to show a registration process."""
1717
from IPython.display import SVG, display as _disp
18+
1819
if isinstance(fixed_image, (str, Path)):
1920
fixed_image = nb.load(str(fixed_image))
2021
if isinstance(moving_image, (str, Path)):
@@ -28,24 +29,34 @@ def display(
2829
cuts = cuts_from_bbox(contour, cuts=n_cuts)
2930
else:
3031
hdr = fixed_image.header.copy()
31-
hdr.set_data_dtype('uint8')
32+
hdr.set_data_dtype("uint8")
3233
mask_nii = nb.Nifti1Image(
33-
np.ones(fixed_image.shape, dtype='uint8'),
34-
fixed_image.affine, hdr)
34+
np.ones(fixed_image.shape, dtype="uint8"), fixed_image.affine, hdr
35+
)
3536
cuts = cuts_from_bbox(mask_nii, cuts=n_cuts)
3637

3738
# Call composer
38-
_disp(SVG(compose_view(
39-
plot_registration(fixed_image, 'fixed-image',
40-
estimate_brightness=True,
41-
cuts=cuts,
42-
label=fixed_label,
43-
contour=contour,
44-
compress=False),
45-
plot_registration(moving_image, 'moving-image',
46-
estimate_brightness=True,
47-
cuts=cuts,
48-
label=moving_label,
49-
contour=contour,
50-
compress=False),
51-
)))
39+
_disp(
40+
SVG(
41+
compose_view(
42+
plot_registration(
43+
fixed_image,
44+
"fixed-image",
45+
estimate_brightness=True,
46+
cuts=cuts,
47+
label=fixed_label,
48+
contour=contour,
49+
compress=False,
50+
),
51+
plot_registration(
52+
moving_image,
53+
"moving-image",
54+
estimate_brightness=True,
55+
cuts=cuts,
56+
label=moving_label,
57+
contour=contour,
58+
compress=False,
59+
),
60+
)
61+
)
62+
)

0 commit comments

Comments
 (0)