@Test(expected = NullPointerException.class) public void testSplitSubspacesThrowsNPEIfTypesNull() { final Img<ByteType> img = ArrayImgs.bytes(2, 2); final ImgPlus<ByteType> imgPlus = new ImgPlus<>(img, "", X_AXIS, Y_AXIS); splitSubspaces(imgPlus, null); }
public static <T extends RealType<T> & NativeType<T>> Stream<Subspace<T>> splitSubspaces(final ImgPlus<T> hyperStack, final Collection<AxisType> subspaceTypes) { final Builder<Subspace<T>> builder = Stream.builder(); final int[] splitIndices = findSplitAxisIndices(hyperStack, subspaceTypes); final long[] typeSubscripts = mapTypeSubscripts(hyperStack, splitIndices); final int numSplits = splitIndices.length; final HyperAxisMeta[] subspaceMeta = new HyperAxisMeta[numSplits]; final List<ValuePair<IntType, LongType>> split = new ArrayList<>(); splitDims(hyperStack, splitIndices, numSplits - 1, subspaceMeta, split, typeSubscripts, builder); return builder.build(); }
HyperstackUtils { public static <T extends RealType<T> & NativeType<T>> Stream<Subspace<T>> splitSubspaces(final ImgPlus<T> hyperStack, final Collection<AxisType> subspaceTypes) { final Builder<Subspace<T>> builder = Stream.builder(); final int[] splitIndices = findSplitAxisIndices(hyperStack, subspaceTypes); final long[] typeSubscripts = mapTypeSubscripts(hyperStack, splitIndices); final int numSplits = splitIndices.length; final HyperAxisMeta[] subspaceMeta = new HyperAxisMeta[numSplits]; final List<ValuePair<IntType, LongType>> split = new ArrayList<>(); splitDims(hyperStack, splitIndices, numSplits - 1, subspaceMeta, split, typeSubscripts, builder); return builder.build(); } }
HyperstackUtils { public static <T extends RealType<T> & NativeType<T>> Stream<Subspace<T>> splitSubspaces(final ImgPlus<T> hyperStack, final Collection<AxisType> subspaceTypes) { final Builder<Subspace<T>> builder = Stream.builder(); final int[] splitIndices = findSplitAxisIndices(hyperStack, subspaceTypes); final long[] typeSubscripts = mapTypeSubscripts(hyperStack, splitIndices); final int numSplits = splitIndices.length; final HyperAxisMeta[] subspaceMeta = new HyperAxisMeta[numSplits]; final List<ValuePair<IntType, LongType>> split = new ArrayList<>(); splitDims(hyperStack, splitIndices, numSplits - 1, subspaceMeta, split, typeSubscripts, builder); return builder.build(); } private  HyperstackUtils(); }
HyperstackUtils { public static <T extends RealType<T> & NativeType<T>> Stream<Subspace<T>> splitSubspaces(final ImgPlus<T> hyperStack, final Collection<AxisType> subspaceTypes) { final Builder<Subspace<T>> builder = Stream.builder(); final int[] splitIndices = findSplitAxisIndices(hyperStack, subspaceTypes); final long[] typeSubscripts = mapTypeSubscripts(hyperStack, splitIndices); final int numSplits = splitIndices.length; final HyperAxisMeta[] subspaceMeta = new HyperAxisMeta[numSplits]; final List<ValuePair<IntType, LongType>> split = new ArrayList<>(); splitDims(hyperStack, splitIndices, numSplits - 1, subspaceMeta, split, typeSubscripts, builder); return builder.build(); } private  HyperstackUtils(); static Stream<Subspace<T>> split3DSubspaces(final ImgPlus<T> hyperStack); static Stream<Subspace<T>> splitSubspaces(final ImgPlus<T> hyperStack,
			final Collection<AxisType> subspaceTypes); }
HyperstackUtils { public static <T extends RealType<T> & NativeType<T>> Stream<Subspace<T>> splitSubspaces(final ImgPlus<T> hyperStack, final Collection<AxisType> subspaceTypes) { final Builder<Subspace<T>> builder = Stream.builder(); final int[] splitIndices = findSplitAxisIndices(hyperStack, subspaceTypes); final long[] typeSubscripts = mapTypeSubscripts(hyperStack, splitIndices); final int numSplits = splitIndices.length; final HyperAxisMeta[] subspaceMeta = new HyperAxisMeta[numSplits]; final List<ValuePair<IntType, LongType>> split = new ArrayList<>(); splitDims(hyperStack, splitIndices, numSplits - 1, subspaceMeta, split, typeSubscripts, builder); return builder.build(); } private  HyperstackUtils(); static Stream<Subspace<T>> split3DSubspaces(final ImgPlus<T> hyperStack); static Stream<Subspace<T>> splitSubspaces(final ImgPlus<T> hyperStack,
			final Collection<AxisType> subspaceTypes);  }