fsleyes.actions.loaddicom¶
This module provides the LoadDicomAction class, an Action
which allows the user to load images from a DICOM directory.
A few standalone functions are also defined in this module:
Does the following: |
-
class
fsleyes.actions.loaddicom.LoadDicomAction(overlayList, displayCtx, frame)[source]¶ Bases:
fsleyes.actions.base.ActionThe
LoadDicomActionis anActionwhich allows the user to load images from a DICOM directory. When invoked, theLoadDicomActiondoes the following:Prompts the user to select a DICOM directory
Identifies the data series that are present in the directory
Prompts the user to select which series they would like to load
Loads the selected series.
-
__init__(overlayList, displayCtx, frame)[source]¶ Create a
LoadDicomAction.- Parameters
overlayList – The
OverlayList.displayCtx – The
DisplayContext.frame – The
FSLeyesFrame.
-
_LoadDicomAction__loadDicom()¶ Called when this
LoadDicomActionis invoked. Calls theloadDicom()function.
-
__module__= 'fsleyes.actions.loaddicom'¶
-
fsleyes.actions.loaddicom.loadDicom(dcmdir=None, parent=None, callback=None)[source]¶ Does the following:
Prompts the user to select a DICOM directory (unless
dcmdir is not None)Loads metadata about all of the data series in the DICOM directory
Uses a
BrowseDicomDialogto allow the user to choose which data series they wish to loadLoads the selected series, and passes them to the
callbackfunction if it is provided.
- Parameters
dcmdir – Directory to load DICOMs from. If not provided, the user is prompted to select a directory.
parent –
wxparent object.callback – Function which is passed the loaded DICOM series (
Imageobjects).
-
class
fsleyes.actions.loaddicom.BrowseDicomDialog(parent, dcmseries)[source]¶ Bases:
__main__.MockClassThe
BrowseDicomDialogcontains aBrowseDicomPanel, and a couple of buttons, allowing the user to select which DICOM series they would like to load.-
__init__(parent, dcmseries)[source]¶ Create a
BrowseDicomDialog.- Parameters
parent –
wxparent objectdcmseries – List of DICOM data series, as returned by the
fsl.data.dicom.scanDir()function.
-
IsSelected(sidx)[source]¶ Returns
Trueif the DICOM series at the given index has been selected by the user,Falseotherwise.
-
_BrowseDicomDialog__onCancel(ev)¶ Called when the Cancel button is pushed. Closes the dialog.
-
_BrowseDicomDialog__onLoad(ev)¶ Called when the Load button is pushed. Closes the dialog.
-
__module__= 'fsleyes.actions.loaddicom'¶
-
-
class
fsleyes.actions.loaddicom.BrowseDicomPanel(parent, dcmseries)[source]¶ Bases:
__main__.MockClassThe
BrowseDicomPaneldisplayes information about a collection of DICOM data series, and allows the user to select which series they would like to load.-
__init__(parent, dcmseries)[source]¶ Create a
BrowseDicomPanel.- Parameters
parent –
wxparent objectdcmseries – List of DICOM data series, as returned by the
fsl.data.dicom.scanDir()function.
-
IsSelected(sidx)[source]¶ Returns
Trueif the DICOM series at the given index has been selected by the user,Falseotherwise.
-
__module__= 'fsleyes.actions.loaddicom'¶
-