Skip to content

Commit

Permalink
STYLE: Cleaning for codacy
Browse files Browse the repository at this point in the history
  • Loading branch information
pdedumast committed Nov 24, 2020
1 parent d1f9ebc commit 95fd1c0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
3 changes: 2 additions & 1 deletion pymialsrtk/interfaces/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,8 @@ def _compute_motion_index(self, in_file):

img = nibabel.load(in_file)

voxelspacing = img.header['pixdim'][2]
# Todo: Compute centroid displacement as a distance instead of a number of voxel
# voxelspacing = img.header['pixdim'][2]
data = img.get_fdata()

z = np.where(data)[2]
Expand Down
3 changes: 2 additions & 1 deletion pymialsrtk/interfaces/reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@ def _run_interface(self, runtime):
cmd += ['--outer-thresh', str(self.inputs.in_outer_thresh)]

# JSON file SRTV
self.m_output_dict["Description"] = "Isotropic high-resolution image reconstructed using the Total-Variation Super-Resolution algorithm provided by MIALSRTK"
self.m_output_dict["Description"] = "Isotropic high-resolution image reconstructed using the Total-Variation" \
" Super-Resolution algorithm provided by MIALSRTK"
self.m_output_dict["Input sources run order"] = self.inputs.stacks_order
self.m_output_dict["CustomMetaData"] = {}
self.m_output_dict["CustomMetaData"]["Number of scans used"] = str(len(self.inputs.stacks_order))
Expand Down
6 changes: 0 additions & 6 deletions pymialsrtk/pipelines/anatomical/srr.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,6 @@ def create_workflow(self):
srtkTVSuperResolution.inputs.in_lambda = self.lambdaTV
srtkTVSuperResolution.inputs.use_manual_masks = self.use_manual_masks

srTVdictSink = Node(JSONFileSink(),name='srtv_json_sinker')

srtkRefineHRMaskByIntersection = Node(interface=postprocess.MialsrtkRefineHRMaskByIntersection(), name='srtkRefineHRMaskByIntersection')
srtkRefineHRMaskByIntersection.inputs.bids_dir = self.bids_dir

Expand Down Expand Up @@ -408,9 +406,6 @@ def create_workflow(self):
self.wf.connect(srtkImageReconstruction, ("output_transforms", utils.sort_ascending), srtkRefineHRMaskByIntersection, "input_transforms")
self.wf.connect(srtkTVSuperResolution, "output_sr", srtkRefineHRMaskByIntersection, "input_sr")

# self.wf.connect(srtkTVSuperResolution, "output_dict", srTVdictSink, "in_dict")
# self.wf.connect(srtkTVSuperResolution, "output_json_path", srTVdictSink, "out_file")

self.wf.connect(srtkTVSuperResolution, "output_sr", srtkMaskImage02, "in_file")
self.wf.connect(srtkRefineHRMaskByIntersection, "output_srmask", srtkMaskImage02, "in_mask")

Expand All @@ -427,7 +422,6 @@ def create_workflow(self):

self.wf.connect(srtkImageReconstruction, "output_sdi", datasink, 'anat.@SDI')
self.wf.connect(srtkN4BiasFieldCorrection, "output_image", datasink, 'anat.@SR')
# self.wf.connect(srTVdictSink, "out_file", datasink, 'anat.@SRjson')
self.wf.connect(srtkTVSuperResolution, "output_json_path", datasink, 'anat.@SRjson')
self.wf.connect(srtkRefineHRMaskByIntersection, "output_srmask", datasink, 'anat.@SRmask')

Expand Down

0 comments on commit 95fd1c0

Please sign in to comment.