Options

class ipyniivue.config_options.ConfigOptions(**kwargs: Any)[source]

Bases: HasTraits

Configuration options for NiiVue.

__init__(parent=None, **kwargs)[source]
atlas_active_index

An int trait.

atlas_outline

A float trait.

back_color

An instance of a Python tuple.

center_mosaic

A boolean (True, False) trait.

click_to_segment

A boolean (True, False) trait.

click_to_segment_auto_intensity

A boolean (True, False) trait.

click_to_segment_bright

A boolean (True, False) trait.

click_to_segment_intensity_max

A float trait.

click_to_segment_intensity_min

A float trait.

click_to_segment_is_2d

A boolean (True, False) trait.

click_to_segment_max_distance_mm

A float trait.

click_to_segment_percent

A float trait.

click_to_segment_radius

A float trait.

clip_plane_color

An instance of a Python tuple.

clip_plane_hot_key

A trait for unicode strings.

clip_thick

A float trait.

clip_volume_high

An instance of a Python tuple.

clip_volume_low

An instance of a Python tuple.

colorbar_height

A float trait.

colorbar_margin

A float trait.

colorbar_width

A float trait.

crosshair_color

An instance of a Python tuple.

crosshair_gap

A float trait.

crosshair_width

A float trait.

crosshair_width_unit

A trait for unicode strings.

double_touch_timeout

An int trait.

drag_and_drop_enabled

A boolean (True, False) trait.

drag_mode

Use a Enum class as model for the data type description. Note that if no default-value is provided, the first enum-value is used as default-value.

# -- SINCE: Python 3.4 (or install backport: pip install enum34)
import enum
from traitlets import HasTraits, UseEnum


class Color(enum.Enum):
    red = 1  # -- IMPLICIT: default_value
    blue = 2
    green = 3


class MyEntity(HasTraits):
    color = UseEnum(Color, default_value=Color.blue)


entity = MyEntity(color=Color.red)
entity.color = Color.green  # USE: Enum-value (preferred)
entity.color = "green"  # USE: name (as string)
entity.color = "Color.green"  # USE: scoped-name (as string)
entity.color = 3  # USE: number (as int)
assert entity.color is Color.green
drag_mode_primary

Use a Enum class as model for the data type description. Note that if no default-value is provided, the first enum-value is used as default-value.

# -- SINCE: Python 3.4 (or install backport: pip install enum34)
import enum
from traitlets import HasTraits, UseEnum


class Color(enum.Enum):
    red = 1  # -- IMPLICIT: default_value
    blue = 2
    green = 3


class MyEntity(HasTraits):
    color = UseEnum(Color, default_value=Color.blue)


entity = MyEntity(color=Color.red)
entity.color = Color.green  # USE: Enum-value (preferred)
entity.color = "green"  # USE: name (as string)
entity.color = "Color.green"  # USE: scoped-name (as string)
entity.color = 3  # USE: number (as int)
assert entity.color is Color.green
drawing_enabled

A boolean (True, False) trait.

flood_fill_neighbors

An int trait.

font_color

An instance of a Python tuple.

font_min_px

An int trait.

font_size_scaling

A float trait.

force_device_pixel_ratio

A float trait.

gradient_amount

A float trait.

gradient_opacity

A float trait.

gradient_order

An int trait.

hero_image_fraction

An int trait.

hero_slice_type

Use a Enum class as model for the data type description. Note that if no default-value is provided, the first enum-value is used as default-value.

# -- SINCE: Python 3.4 (or install backport: pip install enum34)
import enum
from traitlets import HasTraits, UseEnum


class Color(enum.Enum):
    red = 1  # -- IMPLICIT: default_value
    blue = 2
    green = 3


class MyEntity(HasTraits):
    color = UseEnum(Color, default_value=Color.blue)


entity = MyEntity(color=Color.red)
entity.color = Color.green  # USE: Enum-value (preferred)
entity.color = "green"  # USE: name (as string)
entity.color = "Color.green"  # USE: scoped-name (as string)
entity.color = 3  # USE: number (as int)
assert entity.color is Color.green
interactive

A boolean (True, False) trait.

invert_scroll_direction

A boolean (True, False) trait.

is_2d_slice_shader

A boolean (True, False) trait.

is_additive_blend

A boolean (True, False) trait.

is_alpha_clip_dark

A boolean (True, False) trait.

is_anti_alias

A trait which allows any value.

is_colorbar

A boolean (True, False) trait.

is_corner_orientation_text

A boolean (True, False) trait.

is_depth_pick_mesh

A boolean (True, False) trait.

is_filled_pen

A boolean (True, False) trait.

is_force_mouse_click_to_voxel_centers

A boolean (True, False) trait.

is_nearest_interpolation

A boolean (True, False) trait.

is_orient_cube

A boolean (True, False) trait.

is_orientation_text_visible

A boolean (True, False) trait.

is_radiological_convention

A boolean (True, False) trait.

is_resize_canvas

A boolean (True, False) trait.

is_ruler

A boolean (True, False) trait.

is_slice_mm

A boolean (True, False) trait.

is_v1_slice_shader

A boolean (True, False) trait.

key_debounce_time

An int trait.

legend_background_color

An instance of a Python tuple.

legend_text_color

An instance of a Python tuple.

limit_frames_4d

A float trait.

loading_text

A trait for unicode strings.

log_level

A trait for unicode strings.

long_touch_timeout

An int trait.

max_draw_undo_bitmaps

An int trait.

measure_line_color

An instance of a Python tuple.

measure_text_color

An instance of a Python tuple.

measure_text_height

A float trait.

measure_text_justify

A trait for unicode strings.

mesh_thickness_on_2d

A float trait.

mesh_xray

A float trait.

multiplanar_equal_size

A boolean (True, False) trait.

multiplanar_force_render

A boolean (True, False) trait.

multiplanar_layout

Use a Enum class as model for the data type description. Note that if no default-value is provided, the first enum-value is used as default-value.

# -- SINCE: Python 3.4 (or install backport: pip install enum34)
import enum
from traitlets import HasTraits, UseEnum


class Color(enum.Enum):
    red = 1  # -- IMPLICIT: default_value
    blue = 2
    green = 3


class MyEntity(HasTraits):
    color = UseEnum(Color, default_value=Color.blue)


entity = MyEntity(color=Color.red)
entity.color = Color.green  # USE: Enum-value (preferred)
entity.color = "green"  # USE: name (as string)
entity.color = "Color.green"  # USE: scoped-name (as string)
entity.color = 3  # USE: number (as int)
assert entity.color is Color.green
multiplanar_pad_pixels

An int trait.

multiplanar_show_render

Use a Enum class as model for the data type description. Note that if no default-value is provided, the first enum-value is used as default-value.

# -- SINCE: Python 3.4 (or install backport: pip install enum34)
import enum
from traitlets import HasTraits, UseEnum


class Color(enum.Enum):
    red = 1  # -- IMPLICIT: default_value
    blue = 2
    green = 3


class MyEntity(HasTraits):
    color = UseEnum(Color, default_value=Color.blue)


entity = MyEntity(color=Color.red)
entity.color = Color.green  # USE: Enum-value (preferred)
entity.color = "green"  # USE: name (as string)
entity.color = "Color.green"  # USE: scoped-name (as string)
entity.color = 3  # USE: number (as int)
assert entity.color is Color.green
pen_size

A float trait.

pen_value

A float trait.

render_overlay_blend

A float trait.

render_silhouette

A float trait.

ruler_color

An instance of a Python tuple.

ruler_width

A float trait.

sagittal_nose_left

A boolean (True, False) trait.

scroll_requires_focus

A boolean (True, False) trait.

selection_box_color

An instance of a Python tuple.

selection_box_is_outline

A boolean (True, False) trait.

selection_box_line_thickness

A float trait.

show_3d_crosshair

A boolean (True, False) trait.

show_colorbar_border

A boolean (True, False) trait.

show_legend

A boolean (True, False) trait.

show_measure_units

A boolean (True, False) trait.

slice_mosaic_string

A trait for unicode strings.

slice_type

Use a Enum class as model for the data type description. Note that if no default-value is provided, the first enum-value is used as default-value.

# -- SINCE: Python 3.4 (or install backport: pip install enum34)
import enum
from traitlets import HasTraits, UseEnum


class Color(enum.Enum):
    red = 1  # -- IMPLICIT: default_value
    blue = 2
    green = 3


class MyEntity(HasTraits):
    color = UseEnum(Color, default_value=Color.blue)


entity = MyEntity(color=Color.red)
entity.color = Color.green  # USE: Enum-value (preferred)
entity.color = "green"  # USE: name (as string)
entity.color = "Color.green"  # USE: scoped-name (as string)
entity.color = 3  # USE: number (as int)
assert entity.color is Color.green
text_height

A float trait.

thumbnail

A trait for unicode strings.

tile_margin

A float trait.

trust_cal_min_max

A boolean (True, False) trait.

view_mode_hot_key

A trait for unicode strings.

yoke_3d_to_2d_zoom

A boolean (True, False) trait.