AntomyVis Class

A class for creating interactive brain region visualizations using Plotly.

param region_dict:

Dictionary mapping region names to (x, y) coordinates.

type region_dict:

dict

param species:

The species for which the visualization is being created.

type species:

str

sckan_compare.anatomyvis.AntomyVis.region_dict

Dictionary mapping region names to (x, y) coordinates.

Type:

dict

sckan_compare.anatomyvis.AntomyVis.species

The species for which the visualization is being created.

Type:

str

sckan_compare.anatomyvis.AntomyVis.SCALE

Scaling factor for the visualization.

Type:

int

sckan_compare.anatomyvis.AntomyVis.MAX_X

Maximum X coordinate.

Type:

int

sckan_compare.anatomyvis.AntomyVis.MAX_Y

Maximum Y coordinate.

Type:

int

sckan_compare.anatomyvis.AntomyVis.NODE_RADIUS

Radius of the node markers.

Type:

float

sckan_compare.anatomyvis.AntomyVis.fig

Plotly figure widget for visualization.

Type:

go.FigureWidget

__init__(region_dict, species):

Initialize the AntomyVis class.

get_json_species_map(species=None):

Load a JSON species mapping of region names to (x, y) coordinates for anatomical visualization.

draw_rect(start_x, start_y, width=1, height=1, color_border="#4051BF", color_fill="#C5CAE9", tooltiptext="<set name>"):

Draw a rectangular region on the visualization.

draw_poly(xlist, ylist, color_border="#4051BF", color_fill="#C5CAE9", tooltiptext="<set name>"):

Draw a polygonal region on the visualization.

draw_background():

Draw the anatomical background for species.

mark_node(region, color_border="#FF0000", color_fill="#FFFF00", small=False):

Mark a node (brain region) on the visualization.

interpolate_coordinates(point1, point2, resolution=0.1):

Interpolate between two cartesian coordinates using NumPy.

plot_dataframe(df):

Plot dataframe connectivity info.

draw_edge_AB(region1, region2, neuron=None):

Draw an edge (connection) between two nodes (regions) A and B.

draw_edge_ABC(region1, region2, region3, neuron=None):

Draw an edge (connection) between nodes (regions) A and B via C.

show_figure():

Display the Plotly figure widget.

get_figure():

Get the Plotly figure widget.