Skip to content

Commit

Permalink
use ingredient stored for compartment
Browse files Browse the repository at this point in the history
  • Loading branch information
meganrm committed Oct 11, 2023
1 parent 4a887de commit 25d9839
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions cellpack/autopack/Environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -3151,6 +3151,7 @@ def create_voxelization(self, image_data, image_size, voxel_size, hollow=False):
channel_colors = []

for obj in self.packed_objects.get_all():
mesh_store = None
if obj.name not in image_data:
image_data[obj.name] = numpy.zeros(image_size, dtype=numpy.uint8)
if obj.color is not None:
Expand All @@ -3159,12 +3160,9 @@ def create_voxelization(self, image_data, image_size, voxel_size, hollow=False):
color = [int(col * 255) for col in obj.color]
channel_colors.append(color)
if obj.is_compartment:
obj_instance = self.get_compartment_object_by_name(obj.name)
mesh_store = self.mesh_store
else:
obj_instance = obj.ingredient
mesh_store = None
image_data[obj.name] = obj_instance.create_voxelization(

image_data[obj.name] = obj.ingredient.create_voxelization(
image_data=image_data[obj.name],
bounding_box=self.boundingBox,
voxel_size=voxel_size,
Expand Down

0 comments on commit 25d9839

Please sign in to comment.