Skip to content

Commit

Permalink
Cleaned up return from volume.py::_from_numpy()
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorTatarnikov committed Nov 16, 2023
1 parent 0dcdbee commit 5de85ef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions brainrender/actors/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,12 @@ def _from_numpy(self, griddata, voxel_size, color, **volume_kwargs):
Creates a vedo.Volume actor from a 3D numpy array
with volume data
"""
volume = VedoVolume(

return VedoVolume(
griddata,
spacing=[voxel_size, voxel_size, voxel_size],
**volume_kwargs,
)
volume.cmap(color)
return volume
).cmap(color)

def _from_file(self, filepath, voxel_size, color, **volume_kwargs):
"""
Expand Down
2 changes: 1 addition & 1 deletion examples/neurons.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
scene = Scene(title="neurons")

# Add a neuron from file
# scene.add(Neuron("data/neuron1.swc"))
scene.add(Neuron("data/neuron1.swc"))

# Download neurons data with morphapi
mlapi = MouseLightAPI()
Expand Down

0 comments on commit 5de85ef

Please sign in to comment.