Skip to content

Commit

Permalink
Update srr.py
Browse files Browse the repository at this point in the history
DOC: update docstrings
  • Loading branch information
hamzake authored Oct 30, 2020
1 parent 113fc84 commit 6122588
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions pymialsrtk/pipelines/anatomical/srr.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,26 @@

class AnatomicalPipeline:
"""
Description of the class and attributes
Creates a pipeline instance to run the workflow
A typical execution looks like:
# Initialize an instance of AnatomicalPipeline
pipeline = AnatomicalPipeline(bids_dir,
output_dir,
subject,
p_stacksOrder,
srID,
session,
paramTV,
use_manual_masks)
# Create the super resolution Nipype workflow
pipeline.create_workflow()
# Execute the workflow
res = pipeline.run(number_of_cores)
"""

bids_dir = None
Expand Down Expand Up @@ -64,7 +83,9 @@ def __init__(self, bids_dir, output_dir, subject,

def create_workflow(self):
"""
Create the Niype workflow of the super-resolution pipeline
Create the Niype workflow of the super-resolution pipeline.
It is composed of a succession of Nodes and their corresponding parameters,
where the output of node i goes to the input of node i+1.
"""

sub_ses = self.subject
Expand Down Expand Up @@ -173,7 +194,7 @@ def create_workflow(self):
srtkCorrectSliceIntensity01_nlm.inputs.out_postfix = '_uni'

srtkCorrectSliceIntensity01 = Node(interface=preprocess.MultipleMialsrtkCorrectSliceIntensity(), name='srtkCorrectSliceIntensity01')
srtkCorrectSliceIntensity01.inputs.bids_dir = self.bids_dir
srtkCorrectSliceIntensity0deltatTV1.inputs.bids_dir = self.bids_dir
srtkCorrectSliceIntensity01.inputs.stacksOrder = self.p_stacksOrder
srtkCorrectSliceIntensity01.inputs.out_postfix = '_uni'

Expand Down Expand Up @@ -423,6 +444,7 @@ def run(self, number_of_cores=1):
Execute the super-resolution pipeline and the execution graph
as a PNG image
"""

if(number_of_cores != 1):
res = self.wf.run(plugin='MultiProc', plugin_args={'n_procs': self.number_of_cores})
self.dictsink.run()
Expand Down

0 comments on commit 6122588

Please sign in to comment.