RadiologyViewOverlays
Helper class to create and manage ViewOverlays commonly shown in radiology workstations.
Extends
Methods
| Method | Description |
|---|---|
| addOverlay() | Create and add the given overlayTypes the the given view. |
| removeOverlay() | Removes a ViewOverlay that was previously created through addOverlays(). |
| isOverlayVisible() | Returns if the given overlay is visible in the given view. |
| setOverlayVisibility() | Sets the visibility of the given overlay in the given view. |
| orientationMeshType() | Returns the mesh used in the OrientationMesh overlay. |
| setOrientationMeshType() | Sets the mesh to be used in the OrientationMesh overlay. |
| setPatientInfoFormatter() | Defines the content of the PatientInfo overlay based on a formatting function. |
| setPatientInfoFormatString() | Defines the content of the PatientInfo overlay based on a format string. |
Inherited from ClassHandle
| Method | Description |
|---|---|
| isAliasOf() | Returns true if this handle and other alias the same underlying C++ object. |
| delete() | Releases this JavaScript handle. |
| deleteLater() | Schedules this handle for deferred deletion and returns this handle. |
| isDeleted() | Returns true if this handle has already been deleted. |
| [dispose]() | Releases this handle when the enclosing scope exits, so a handle can be declared with using instead of calling delete() later manually. |
| clone() | Returns a new JavaScript handle aliasing the same underlying C++ object. |
addOverlay()
addOverlay(view: View, overlayType: OverlayType): void;Create and add the given overlayTypes the the given view.
Parameters
| Parameter | Type | Description |
|---|---|---|
view | View | The view to add the overlay to |
overlayType | OverlayType | The type of overlay to add |
Returns
void
removeOverlay()
removeOverlay(view: View, overlayType: OverlayType): boolean;Removes a ViewOverlay that was previously created through addOverlays().
Parameters
| Parameter | Type | Description |
|---|---|---|
view | View | The view to add the overlay to |
overlayType | OverlayType | The type of overlay to add |
Returns
boolean
Whether the overlay existed before and is now successfully removed
isOverlayVisible()
isOverlayVisible(view: View, type: OverlayType): boolean;Returns if the given overlay is visible in the given view.
Parameters
| Parameter | Type |
|---|---|
view | View |
type | OverlayType |
Returns
boolean
setOverlayVisibility()
setOverlayVisibility(
view: View,
type: OverlayType,
visible: boolean): void;Sets the visibility of the given overlay in the given view.
Parameters
| Parameter | Type |
|---|---|
view | View |
type | OverlayType |
visible | boolean |
Returns
void
orientationMeshType()
orientationMeshType(): OrientationMeshType;Returns the mesh used in the OrientationMesh overlay.
Returns
setOrientationMeshType()
setOrientationMeshType(type: OrientationMeshType): void;Sets the mesh to be used in the OrientationMesh overlay.
Parameters
| Parameter | Type |
|---|---|
type | OrientationMeshType |
Returns
void
setPatientInfoFormatter()
setPatientInfoFormatter(formatter: (imageInfo: ImageInfo) => string): void;Defines the content of the PatientInfo overlay based on a formatting function.
Parameters
| Parameter | Type |
|---|---|
formatter | (imageInfo: ImageInfo) => string |
Returns
void
setPatientInfoFormatString()
setPatientInfoFormatString(formatString: EmbindString): void;Defines the content of the PatientInfo overlay based on a format string.
The format string can contain placeholders using the syntax {placeholder}, where "placeholder" is one of the following:
patient_name, birthdate, study_date, study_time, modality, patient_sex.
Parameters
| Parameter | Type |
|---|---|
formatString | EmbindString |
Returns
void
Example
(also the default formatting string after construction):
setPatientInfoFormatString('{modality}: {patient_name} ({patient_sex}) - {study_date} {study_time}');