Skip to content

Commit

Permalink
fix single index cutouts (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
dxenes1 committed Jun 23, 2023
1 parent 8091885 commit b90e209
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions intern/service/cv/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@ def get_cutout(self, resource, res, x_range, y_range, z_range):
x_range[0] : x_range[1], y_range[0] : y_range[1], z_range[0] : z_range[1]
]

# Remove channel dimension if num_channel = 1
data = np.squeeze(data)
# Remove channel dimension
if data.ndim == 4:
data = data[:,:,:,0]
return data

def delete_data(self, resource, res, x_range, y_range, z_range):
Expand Down

0 comments on commit b90e209

Please sign in to comment.