IMHOTEP Framework
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Public Types | Static Public Member Functions | Properties | List of all members
PatientEventSystem Class Reference

Public Types

enum  Event {
  Event.PATIENT_StartLoading, Event.PATIENT_Loaded, Event.PATIENT_FinishedLoading, Event.PATIENT_NewPatientDirectoryFound,
  Event.PATIENT_Closed, Event.MESH_LoadedSingle, Event.MESH_LoadedAll, Event.MESH_Opacity_Changed,
  Event.DICOM_NewList, Event.DICOM_StartLoadingSlice, Event.DICOM_StartLoadingVolume, Event.DICOM_NewLoadedSlice,
  Event.DICOM_NewLoadedVolume, Event.DICOM_AllCleared, Event.DICOM_CloseVolume, Event.LOADING_AddLoadingJob,
  Event.LOADING_RemoveLoadingJob
}
 

Static Public Member Functions

static void startListening (Event eventType, UnityAction< object > listener)
 
static void stopListening (Event eventType, UnityAction< object > listener)
 
static void triggerEvent (Event eventType, object obj=null)
 
static void executeSavedEvents ()
 

Properties

static PatientEventSystem instance [get]
 

Detailed Description

Event system for all patient-related events. Listeners can register for specific events and will be notified from now on. This class is a (static) signleton.

Definition at line 24 of file PatientEventSystem.cs.

Member Enumeration Documentation

All possible events:

Enumerator
PATIENT_StartLoading 

Called when we start loading a new Patient.

PATIENT_Loaded 

Called when we have loaded a new Patient.

Note
Only the meta-data of the Patient will be available at this point (views, annotations etc.). The Mesh and DICOM might still be loading! Patient is passed to the callbacks.
PATIENT_FinishedLoading 

Called when we have finished loading a new Patient, including Mesh and DICOM.

Note
This will be called when the DICOM directory has been parsed and the Mesh has been loaded. Patient is passed to the callbacks.
PATIENT_NewPatientDirectoryFound 

Called when we've found a new directory while looking for patients.

PATIENT_Closed 

Called as soon as someone closes the Patient using the close button.

Note
At this point, you should stop referencing any Patients and clear all Patient-related displays/data.
MESH_LoadedSingle 

Called when a new (single!) mesh has been loaded. Other meshes might still be loading. The new GameObject holding the new mesh is passed to the callbacks.

MESH_LoadedAll 

Called when all meshes has been loaded.

MESH_Opacity_Changed 

Called when mesh opacity is changed. Internal use only.

Note
Not called if a slider changed the opacity.
DICOM_NewList 

Called when a new list of DICOMs has been created from the DICOM folder. If needed, the list can be retrieved using PatientDirectoryLoader.getAvailableSeries().

DICOM_StartLoadingSlice 

Called when the user wants to start loading a new DICOM slice.

DICOM_StartLoadingVolume 

Called when the user wants to start loading a new DICOM volume.

DICOM_NewLoadedSlice 

Called when we've loaded a new slice.

DICOM_NewLoadedVolume 

Called when we've loaded a new volume. Note: You should also listen to DICOM_CloseVolume and respond correctly!

DICOM_AllCleared 

Internal use only.

DICOM_CloseVolume 

Called to signal that a volume is to be closes. All users must immediately stop using the DICOM volume!

LOADING_AddLoadingJob 

Internal use only.

LOADING_RemoveLoadingJob 

Internal use only.

Definition at line 31 of file PatientEventSystem.cs.

Member Function Documentation

static void PatientEventSystem.startListening ( Event  eventType,
UnityAction< object >  listener 
)
inlinestatic

Start calling the function listener whenever eventType happens.

Definition at line 96 of file PatientEventSystem.cs.

static void PatientEventSystem.stopListening ( Event  eventType,
UnityAction< object >  listener 
)
inlinestatic

Stop calling the function listener. This should be called with the exact same parameters as were passed to startListening before.

Definition at line 114 of file PatientEventSystem.cs.

Property Documentation

PatientEventSystem PatientEventSystem.instance
staticget

Returns the singleton instance:

Definition at line 86 of file PatientEventSystem.cs.


The documentation for this class was generated from the following file: