diff --git a/nibabel/nicom/dicomwrappers.py b/nibabel/nicom/dicomwrappers.py index 622ab0927..02c987b0f 100755 --- a/nibabel/nicom/dicomwrappers.py +++ b/nibabel/nicom/dicomwrappers.py @@ -756,13 +756,11 @@ def image_shape(self): return (rows, cols) # Initialize array of frame indices try: - frame_indices = np.array( + frame_indices = np.atleast_2d( [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