PyJEM.femtus.image_color¶
- PyJEM.femtus.image_color.set_palette(dataset_id, body)¶
Set a palette for the specified dataset.
- Parameters:
dataset_id (str) – ID of the target dataset.
body (dict) –
Palette configuration.
=> See Palette body items.
items
key
type
value
Kind
str
Palette type. One of
"Color"or"GrayScale".Color
dict
RGB color values.
=> See Palette color items.
Color items
key
type
value
Red
int
Red channel value from 0 to 255.
Green
int
Green channel value from 0 to 255.
Blue
int
Blue channel value from 0 to 255.
- Return type:
None
Examples
>>> param = { "Color": { "Blue": 255, "Green": 255, "Red": 255 }, "Kind": "Color" } >>> set_palette("2281e03f-1451-4df1-b671-c11822c82717", param)
- PyJEM.femtus.image_color.set_overlay(data)¶
Set an overlay with the given data.
- Parameters:
data (list[dict]) –
Overlay configuration entries.
=> See Overlay data items.
items
key
type
value
Id
str
Target identifier.
Color
dict
RGB color values.
=> See Overlay color items.
Color items
key
type
value
Red
int
Red channel value from 0 to 255.
Green
int
Green channel value from 0 to 255.
Blue
int
Blue channel value from 0 to 255.
- Return type:
None
Note
Please ensure the input list contains two or more objects.
Examples
>>> param = [ { "Color": { "Blue": 128, "Green": 128, "Red": 128 }, "Id": "d868f623-7712-439a-b693-fdb23c1343d7" }, { "Color": { "Blue": 128, "Green": 128, "Red": 128 }, "Id": "ac08cf3d-2497-4d9b-ab18-438aa1c3f24b" } ] >>> set_overlay(param)