diff --git a/brainglobe_heatmap/heatmaps.py b/brainglobe_heatmap/heatmaps.py index 318b452..c959cd3 100644 --- a/brainglobe_heatmap/heatmaps.py +++ b/brainglobe_heatmap/heatmaps.py @@ -51,7 +51,7 @@ def check_values(values: dict, atlas: Atlas) -> Tuple[float, float]: class heatmap: def __init__( self, - values: Dict[str, float], + values: Dict, position: Union[list, tuple, np.ndarray], orientation: Union[str, tuple] = "frontal", hemisphere: str = "both", @@ -253,40 +253,3 @@ def plot( plt.show() return f - - -if __name__ == "__main__": - values = dict( # scalar values for each region - TH=1, - RSP=0.2, - AI=0.4, - SS=-3, - MO=2.6, - PVZ=-4, - LZ=-3, - VIS=2, - AUD=0.3, - RHP=-0.2, - STR=0.5, - CB=0.5, - FRP=-1.7, - HIP=3, - PA=-4, - ) - - heatmap( - values, - position=None, - # or 'sagittal', or 'horizontal' or a tuple (x,y,z) - orientation=( - 1, - 1, - 0, - ), - # thickness of the slices used for rendering (in microns) - thickness=250, - title="frontal", - vmin=-5, - vmax=3, - format="3D", - ).show() diff --git a/examples/heatmap_human_brain.py b/examples/heatmap_human_brain.py new file mode 100644 index 0000000..37ed820 --- /dev/null +++ b/examples/heatmap_human_brain.py @@ -0,0 +1,19 @@ +""" +This example shows how to generate a heatmap with the `allen_human_500um` +human brain atlas. + +N.B. the physical scales are very different to e.g. the small animal atlases. +""" + +import brainglobe_heatmap as bgh + +values = dict(SFG=1, PrCG=2, Ca=4, Pu=10) # scalar values for each region + + +scene = bgh.heatmap( + values, + position=(100000, 100000, 100000), + thickness=1000, + atlas_name="allen_human_500um", + format="2D", +).show() diff --git a/examples/heatmap_spinal_coord.py b/examples/heatmap_spinal_cord.py similarity index 100% rename from examples/heatmap_spinal_coord.py rename to examples/heatmap_spinal_cord.py