diff --git a/fsl/data/model.py b/fsl/data/model.py index 86370c79afc0caebaac3adc189c597f5a7e5ed8c..ad4a6e3cf6e06d561edca5b5e4475beb6d82a0a1 100644 --- a/fsl/data/model.py +++ b/fsl/data/model.py @@ -49,7 +49,7 @@ def loadVTKPolydataFile(infile): return vertices, polygonLengths, indices -class PolygonModel(object): +class Model(object): def __init__(self, data, indices=None): """ diff --git a/fsl/fslview/controls/locationpanel.py b/fsl/fslview/controls/locationpanel.py index 9cd8ed8ff44d32702e4ba6982cd26d2366683fa7..c8d63fd8422e3281416f7b4f1a54a506024ca359 100644 --- a/fsl/fslview/controls/locationpanel.py +++ b/fsl/fslview/controls/locationpanel.py @@ -255,8 +255,8 @@ class LocationPanel(fslpanel.FSLViewPanel): if isinstance(overlay, fslimage.Image): refImage = overlay - elif isinstance(overlay, fslmodel.PolygonModel) and \ - isinstance(opts, displaycontext.ModelOpts) and \ + elif isinstance(overlay, fslmodel.Model) and \ + isinstance(opts, displaycontext.ModelOpts) and \ opts.refImage != 'none': refImage = opts.refImage diff --git a/fsl/fslview/controls/overlayselectpanel.py b/fsl/fslview/controls/overlayselectpanel.py index b1a9777e4280c2a372aa905b1b0aceed97acd882..5850b566077e3a2c9ee88c009b0e64083234e7d5 100644 --- a/fsl/fslview/controls/overlayselectpanel.py +++ b/fsl/fslview/controls/overlayselectpanel.py @@ -139,8 +139,9 @@ class OverlaySelectPanel(fslpanel.FSLViewPanel): overlay. """ - def nameChanged(value, valid, ovl, name): + def nameChanged(value, valid, display, name): + ovl = display.getOverlay() idx = self._overlayList.index(ovl) # if the name of the currently selected overlay has changed, diff --git a/fsl/fslview/displaycontext/display.py b/fsl/fslview/displaycontext/display.py index 4e096bf90565b88449298dcc46dcd49ce1b9dbba..2189cd5af6a659710f4ac6f9e068a3677a4beaca 100644 --- a/fsl/fslview/displaycontext/display.py +++ b/fsl/fslview/displaycontext/display.py @@ -232,8 +232,8 @@ import modelopts OVERLAY_TYPES = td.TypeDict({ - 'Image' : ['volume', 'mask', 'rgbvector', 'linevector'], - 'PolygonModel' : ['model'] + 'Image' : ['volume', 'mask', 'rgbvector', 'linevector'], + 'Model' : ['model'] }) """This dictionary provides a mapping between the overlay classes, and the way in which they may be represented. diff --git a/fsl/tools/fslview_parseargs.py b/fsl/tools/fslview_parseargs.py index 32a66a665f41cbae92e0fafd1154627fe90c3d0e..7a63c36f9597f9406c0d58b052a8422bfa0fa4e1 100644 --- a/fsl/tools/fslview_parseargs.py +++ b/fsl/tools/fslview_parseargs.py @@ -906,7 +906,7 @@ def applyOverlayArgs(args, overlayList, displayCtx, **kwargs): overlays = iio.loadImages(volOverlays, **kwargs) - overlays.extend([fslmodel.PolygonModel(o) for o in nonVolOverlays]) + overlays.extend([fslmodel.Model(o) for o in nonVolOverlays]) overlayList.extend(overlays) @@ -959,7 +959,7 @@ def applyOverlayArgs(args, overlayList, displayCtx, **kwargs): # A similar process is followed for # the ModelOpts.refImage property - if isinstance(overlay, fslmodel.PolygonModel) and \ + if isinstance(overlay, fslmodel.Model) and \ isinstance(opts, fsldisplay.ModelOpts) and \ args.overlays[i].refImage is not None: