Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions nibabel/nicom/dicomwrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -756,13 +756,13 @@ def image_shape(self):
return (rows, cols)
# Initialize array of frame indices
try:
frame_indices = np.array(
[frame.FrameContentSequence[0].DimensionIndexValues for frame in self.frames]
frame_indices = np.stack(
np.atleast_1d(
*(frame.FrameContentSequence[0].DimensionIndexValues for frame in self.frames)
)
)
except AttributeError:
raise WrapperError("Can't find frame 'DimensionIndexValues'")
if len(frame_indices.shape) == 1:
frame_indices = frame_indices.reshape(frame_indices.shape + (1,))
# Determine the shape and which indices to use
shape = [rows, cols]
curr_parts = n_frames
Expand Down
Loading