Skip to content

Commit

Permalink
Check actions before setting roi input.
Browse files Browse the repository at this point in the history
  • Loading branch information
FredLoney committed Apr 30, 2015
1 parent 692f4a2 commit 0a98074
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions qipipe/pipeline/qipipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _run_with_dicom_input(actions, *inputs, **opts):
# Create a new workflow for the current scan type.
wf_gen = QIPipelineWorkflow(wf_actions, **wf_opts)
# Run the workflow on each {volume: [DICOM files]} item.
wf_gen.run_with_dicom_input(scan_input, dest)
wf_gen.run_with_dicom_input(wf_actions, scan_input, dest)

# Make the TCIA subject map.
map_ctp(collection, *subjects, dest=dest)
Expand Down Expand Up @@ -353,8 +353,9 @@ def __init__(self, actions, **opts):
:meth:`run_with_scan_download` method.
"""

def run_with_dicom_input(self, scan_input, dest=None):
def run_with_dicom_input(self, actions, scan_input, dest=None):
"""
:param actions: the workflow actions to perform
:param scan_input: the :class:`qipipe.staging.iterator.ScanInput`
object
:param dest: the TCIA staging destination directory (default is
Expand All @@ -363,7 +364,7 @@ def run_with_dicom_input(self, scan_input, dest=None):
# Set the staging inputs.
staging.set_workflow_inputs(self.workflow, scan_input, dest)
# Set the roi function inputs, if necessary.
if scan_input.iterators.roi:
if 'roi' in actions and scan_input.iterators.roi:
self._set_roi_inputs(*scan_input.iterators.roi)
# Execute the workflow.
self._run_workflow(self.workflow)
Expand Down

0 comments on commit 0a98074

Please sign in to comment.