|
23 | 23 |
|
24 | 24 |
|
25 | 25 | def create_annot_label(subject_id, subjects_dir, fs_dir, parcellation_name): |
26 | | - import cmp |
| 26 | + from cmp.configuration import PipelineConfiguration |
27 | 27 | from cmp.util import runCmd |
28 | 28 |
|
29 | 29 | iflogger.info("Create the cortical labels necessary for our ROIs") |
30 | 30 | iflogger.info("=================================================") |
31 | 31 | fs_label_dir = op.join(op.join(subjects_dir, subject_id), "label") |
32 | 32 | output_dir = op.abspath(op.curdir) |
33 | 33 | paths = [] |
34 | | - cmp_config = cmp.configuration.PipelineConfiguration() |
| 34 | + cmp_config = PipelineConfiguration() |
35 | 35 | cmp_config.parcellation_scheme = "Lausanne2008" |
36 | 36 | for hemi in ["lh", "rh"]: |
37 | 37 | spath = ( |
@@ -332,13 +332,13 @@ def create_annot_label(subject_id, subjects_dir, fs_dir, parcellation_name): |
332 | 332 | def create_roi(subject_id, subjects_dir, fs_dir, parcellation_name, dilation): |
333 | 333 | """Creates the ROI_%s.nii.gz files using the given parcellation information |
334 | 334 | from networks. Iteratively create volume.""" |
335 | | - import cmp |
| 335 | + from cmp.configuration import PipelineConfiguration |
336 | 336 | from cmp.util import runCmd |
337 | 337 |
|
338 | 338 | iflogger.info("Create the ROIs:") |
339 | 339 | output_dir = op.abspath(op.curdir) |
340 | 340 | fs_dir = op.join(subjects_dir, subject_id) |
341 | | - cmp_config = cmp.configuration.PipelineConfiguration() |
| 341 | + cmp_config = PipelineConfiguration() |
342 | 342 | cmp_config.parcellation_scheme = "Lausanne2008" |
343 | 343 | log = cmp_config.get_logger() |
344 | 344 | parval = cmp_config._get_lausanne_parcellation("Lausanne2008")[parcellation_name] |
@@ -467,12 +467,12 @@ def create_roi(subject_id, subjects_dir, fs_dir, parcellation_name, dilation): |
467 | 467 |
|
468 | 468 |
|
469 | 469 | def create_wm_mask(subject_id, subjects_dir, fs_dir, parcellation_name): |
470 | | - import cmp |
| 470 | + from cmp.configuration import PipelineConfiguration |
471 | 471 | import scipy.ndimage.morphology as nd |
472 | 472 |
|
473 | 473 | iflogger.info("Create white matter mask") |
474 | 474 | fs_dir = op.join(subjects_dir, subject_id) |
475 | | - cmp_config = cmp.configuration.PipelineConfiguration() |
| 475 | + cmp_config = PipelineConfiguration() |
476 | 476 | cmp_config.parcellation_scheme = "Lausanne2008" |
477 | 477 | pgpath = cmp_config._get_lausanne_parcellation("Lausanne2008")[parcellation_name][ |
478 | 478 | "node_information_graphml" |
@@ -618,10 +618,11 @@ def create_wm_mask(subject_id, subjects_dir, fs_dir, parcellation_name): |
618 | 618 | def crop_and_move_datasets( |
619 | 619 | subject_id, subjects_dir, fs_dir, parcellation_name, out_roi_file, dilation |
620 | 620 | ): |
| 621 | + from cmp.configuration import PipelineConfiguration |
621 | 622 | from cmp.util import runCmd |
622 | 623 |
|
623 | 624 | fs_dir = op.join(subjects_dir, subject_id) |
624 | | - cmp_config = cmp.configuration.PipelineConfiguration() |
| 625 | + cmp_config = PipelineConfiguration() |
625 | 626 | cmp_config.parcellation_scheme = "Lausanne2008" |
626 | 627 | log = cmp_config.get_logger() |
627 | 628 | output_dir = op.abspath(op.curdir) |
|
0 commit comments