def test_tractography(): scene = Scene() analyzer = ABA() p0 = scene.get_region_CenterOfMass("ZI") tract = analyzer.get_projection_tracts_to_target(p0=p0) scene.add_tractography(tract, display_injection_structure=False, color_by="target_region", VIP_regions=['MOs'], VIP_color="red", others_color="ivory")
def ConnectivityScene(): scene = Scene() p0 = scene.get_region_CenterOfMass("ZI") # Then we se these coordinates to get tractography data, note: any set of X,Y,Z coordinates would do. tract = aba.get_projection_tracts_to_target(p0=p0) scene.add_tractography(tract, display_injection_structure=False, color_by="region", display_injection_volume=True, others_alpha=.25) scene.add_brain_regions(['ZI'], colors="ivory", alpha=1) set_camera(scene) scene.render()
def test_tractography(): from brainrender.Utils.ABA.connectome import ABA # Create a scene scene = Scene() # Get the center of mass of the region of interest p0 = scene.get_region_CenterOfMass("ZI") # Get projections to that point analyzer = ABA() tract = analyzer.get_projection_tracts_to_target(p0=p0) # Add the brain regions and the projections to it scene.add_brain_regions(['ZI'], alpha=.4, use_original_color=True) scene.add_tractography(tract, display_injection_structure=False, color_by="region") scene.render(interactive=False, ) scene.close()
""" This tutorial shows how download and rendered afferent mesoscale projection data using the AllenBrainAtlas (ABA) and Scene classes """ import brainrender brainrender.SHADER_STYLE = 'cartoon' from brainrender.scene import Scene from brainrender.atlases.aba import ABA # Create a scene scene = Scene() # Get the center of mass of the region of interest p0 = scene.get_region_CenterOfMass("ZI") # Get projections to that point analyzer = ABA() tract = analyzer.get_projection_tracts_to_target(p0=p0) # Add the brain regions and the projections to it scene.add_brain_regions(['ZI'], alpha=.4, use_original_color=True) scene.add_tractography(tract, display_injection_structure=False, color_by="region") scene.render()
""" This tutorial shows how download and rendered afferent mesoscale projection data using the AllenBrainAtlas (ABA) and Scene classes """ import brainrender brainrender.SHADER_STYLE = 'cartoon' from brainrender.scene import Scene from brainrender.atlases.aba import ABA # Create a scene scene = Scene() # Get the center of mass of the region of interest p0 = scene.get_region_CenterOfMass("ZI") # Get projections to that point analyzer = ABA() tract = analyzer.get_projection_tracts_to_target(p0=p0) # Add the brain regions and the projections to it scene.add_brain_regions(['ZI'], alpha=.4, use_original_color=True) scene.add_tractography(tract, color_by="region") scene.render()
""" This tutorial shows how download and rendered afferent mesoscale projection data using the AllenBrainAtlas (ABA) and Scene classes and coloring a subset of the data differently based on the location of virus injection """ import brainrender brainrender.SHADER_STYLE = "cartoon" from brainrender.scene import Scene # Create a scene scene = Scene(title="tractography") # Get the center of mass of the region of interest p0 = scene.atlas.get_region_CenterOfMass("ZI") # Get projections to that point tract = scene.atlas.get_projection_tracts_to_target(p0=p0) # Add the brain regions and the projections to it scene.add_brain_regions(["ZI"], alpha=0.4, use_original_color=True) scene.add_tractography(tract, color_by="target_region", VIP_regions=["SCm"], VIP_color="green") scene.render()
""" This tutorial shows how download and rendered afferent mesoscale projection data using the AllenBrainAtlas (ABA) and Scene classes """ import brainrender brainrender.SHADER_STYLE = "cartoon" from brainrender.scene import Scene # Create a scene scene = Scene(title="tractography") # Get the center of mass of the region of interest p0 = scene.atlas.get_region_CenterOfMass("ZI") # Get projections to that point tract = scene.atlas.get_projection_tracts_to_target(p0=p0) # Add the brain regions and the projections to it scene.add_brain_regions(["ZI"], alpha=0.4, use_original_color=True) scene.add_tractography(tract, color_by="target_region") scene.render()