diff --git a/oxasl/basil/__init__.py b/oxasl/basil/__init__.py index 2ab3029..b9414cb 100644 --- a/oxasl/basil/__init__.py +++ b/oxasl/basil/__init__.py @@ -58,8 +58,6 @@ def groups(self, parser): g = OptionGroup(parser, "BASIL partial volume correction (PVEc)") g.add_option("--pvcorr", help="Apply PVEc using FAST estimates taken from --fslanat dir", action="store_true", default=False) - g.add_option("--surf-pvcorr", help="Apply PVEc using surface PV estimates taken from --fslanat dir w/ surfaces (not mutually exclusive with --pvcorr)", action="store_true", default=False) - g.add_option('--cores', help="Number of processor cores to use for --surf-pvcorr", type=int) g.add_option("--pvgm", help="GM PV estimates in ASL space (apply PVEc only, don't estimate PVs)", type="image", default=None) g.add_option("--pvwm", help="As above, WM PV estimates in ASL space", type="image", default=None) g.add_option("--pvcsf", help="As above, CSF PV estimates in ASL space", type="image", default=None) diff --git a/oxasl/basil/fabber_method.py b/oxasl/basil/fabber_method.py index 18e7886..896de32 100644 --- a/oxasl/basil/fabber_method.py +++ b/oxasl/basil/fabber_method.py @@ -13,10 +13,6 @@ from oxasl import mask, reg from . import multistep_fit -try: - import oxasl_surfpvc -except ImportError: - oxasl_surfpvc = None def run(wsp): # Basic non-PVC run @@ -38,7 +34,7 @@ def run(wsp): # If the user has provided manual PV maps (pvgm and pvgm) then do PVEc, even if they # have not explicitly given the --pvcorr option wsp.user_pv_flag = ((wsp.pvwm is not None) and (wsp.pvgm is not None)) - if wsp.pvcorr or wsp.surf_pvcorr or wsp.user_pv_flag: + if wsp.pvcorr or wsp.user_pv_flag: # Partial volume correction is very sensitive to the mask, so recreate it # if it came from the structural image as this requires accurate ASL->Struc registration if wsp.rois.mask_src == "struc": @@ -49,9 +45,6 @@ def run(wsp): if wsp.pvcorr or wsp.user_pv_flag: _default_pvcorr(wsp) - if wsp.surf_pvcorr: - _surf_pvcorr - def _default_pvcorr(wsp): # Do partial volume correction fitting # @@ -75,19 +68,3 @@ def _default_pvcorr(wsp): multistep_fit.run(wsp.sub("basil_pvcorr"), prefit=False) wsp.quantify_wsps.append("basil_pvcorr") -def _surf_pvcorr(wsp): - if oxasl_surfpvc is None: - raise RuntimeError("Surface-based PVC requested but oxasl_surfpvc is not installed") - if wsp.user_pv_flag: - wsp.log.write(" - WARNING: Performing surface based PVC ignores user-specified PV maps\n") - # Prepare GM and WM partial volume maps from surface using Toblerone plugin - # Then reform the ASL ROI mask - Toblerone does not handle the cerebellum so need - # to mask it out - oxasl_surfpvc.prepare_surf_pvs(wsp) - wsp.rois.mask_pvcorr = wsp.rois.mask - min_pv = 0.01 - new_roi = (wsp.basil_options["pwm"].data > min_pv) | (wsp.basil_options["pgm"].data > min_pv) - wsp.rois.mask = Image(new_roi.astype(np.int8), header=wsp.rois.mask_pvcorr.header) - - multistep_fit.run(wsp.sub("basil_surf_pvcorr"), prefit=False) - wsp.quantify_wsps.append("basil_surf_pvcorr") diff --git a/oxasl/pipeline.py b/oxasl/pipeline.py index 73dbc97..4b4d65c 100755 --- a/oxasl/pipeline.py +++ b/oxasl/pipeline.py @@ -74,11 +74,6 @@ except ImportError: oxasl_enable = None -try: - import oxasl_surfpvc -except ImportError: - oxasl_surfpvc = None - try: import oxasl_multite except ImportError: @@ -192,7 +187,7 @@ def oxasl(wsp): Main oxasl pipeline script """ wsp.log.write("OXASL version: %s\n" % __version__) - for plugin in (oxasl_ve, oxasl_mp, oxasl_deblur, oxasl_enable, oxasl_surfpvc, oxasl_multite): + for plugin in (oxasl_ve, oxasl_mp, oxasl_deblur, oxasl_enable, oxasl_multite): if plugin is not None: wsp.log.write(" - Found plugin: %s (version %s)\n" % (plugin.__name__, getattr(plugin, "__version__", "unknown")))