Brush
Class that allows enabling/disabling and setting options for the Brush.
Extends
Methods
| Method | Description |
|---|---|
| enable() | Enables the Brush interaction |
| disable() | Disables the Brush interaction |
| setLabel() | Setter for a label value with an integer |
| setRadiusMM() | Setter for the Brush radius in mm |
| setAdaptiveness() | Setter for the adaptiveness |
| setFilter() | Activates/deactivates data filtering |
| setData() | Sets the current image and label-map for brushing. |
| radiusRangeMM() | Returns a reasonable [min, max] range for the brush radius in millimeters based on the current input image. |
| setPreviewColor() | Setter for the preview color (RGBA) |
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. |
enable()
ts
enable(): void;Enables the Brush interaction
Returns
void
disable()
ts
disable(): void;Disables the Brush interaction
Returns
void
setLabel()
ts
setLabel(labelValue: number): void;Setter for a label value with an integer
Parameters
| Parameter | Type | Description |
|---|---|---|
labelValue | number | pixel value of the segmented label |
Returns
void
setRadiusMM()
ts
setRadiusMM(radiusMM: number): void;Setter for the Brush radius in mm
Parameters
| Parameter | Type | Description |
|---|---|---|
radiusMM | number | radius of the Brush in mm. |
Returns
void
setAdaptiveness()
ts
setAdaptiveness(adaptiveness: number): void;Setter for the adaptiveness
Parameters
| Parameter | Type |
|---|---|
adaptiveness | number |
Returns
void
setFilter()
ts
setFilter(filter: boolean): void;Activates/deactivates data filtering
Parameters
| Parameter | Type |
|---|---|
filter | boolean |
Returns
void
setData()
ts
setData(image: SharedImageSet, labelMap: SharedImageSet | null): void;Sets the current image and label-map for brushing. Data::Modality::LABEL is set to the label-map if not present. The DataComponent 'LabelDataComponent' (and its default config) is created if not present
Parameters
| Parameter | Type | Description |
|---|---|---|
image | SharedImageSet | image to paint on |
labelMap | SharedImageSet | null | label-map to paint on. If null, a compatible label-map is created and added to the data model. |
Returns
void
radiusRangeMM()
ts
radiusRangeMM(): number[] | undefined;Returns a reasonable [min, max] range for the brush radius in millimeters based on the current input image.
Returns
number[] | undefined
[min, max] in millimeters. Returns undefined if no image is set.
setPreviewColor()
ts
setPreviewColor(color: vec4): void;Setter for the preview color (RGBA)
Parameters
| Parameter | Type |
|---|---|
color | vec4 |
Returns
void