Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
- added fixme in _apply_volume_function
Browse files Browse the repository at this point in the history
  • Loading branch information
nasimrahaman committed Aug 7, 2018
1 parent 4a88ebc commit bfa1867
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion inferno/io/transform/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,17 @@ def _apply_volume_function(self, tensor, **transform_function_kwargs):
assert pyu.has_callable_attr(self, 'volume_function')
# 3D case
if tensor.ndim == 5:
# tensor is bczyx
# volume function is applied to zyx, i.e. loop over b and c
# FIXME This loops one time too many
return np.array([np.array([np.array([self.volume_function(volume,
**transform_function_kwargs)
for volume in channel_volume])
for channel_volume in batch])
for batch in tensor])
elif tensor.ndim == 4:
# We're applying the volume function on a czyx tensor
# We're applying the volume function on a czyx tensor, i.e. we loop over c and apply
# volume function to (zyx)
return np.array([self.volume_function(volume, **transform_function_kwargs)
for volume in tensor])
elif tensor.ndim == 3:
Expand Down

0 comments on commit bfa1867

Please sign in to comment.