Skip to content
Draft
Show file tree
Hide file tree
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
31 changes: 31 additions & 0 deletions src/main/java/net/imglib2/view/Views.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
import net.imglib2.view.composite.InterleaveView;
import net.imglib2.view.composite.NumericComposite;
import net.imglib2.view.composite.RealComposite;
import net.imglib2.view.composite.RealStackCompositeView;

/**
* Create light-weight views into {@link RandomAccessible RandomAccessibles}.
Expand Down Expand Up @@ -1137,6 +1138,36 @@ public static < T > RandomAccessibleInterval< T > stack( final StackAccessMode s
return new StackView<>( Arrays.asList( hyperslices ), stackAccessMode );
}

/**
* Form a {@link RealRandomAccessible} of {@link Composite}s from <em>n</em>
* {@link RealRandomAccessible}s.
*
* @param stackAccessMode
* describes how a {@link RealRandomAccess} on the output
* {@link RealRandonAccessible} maps position changes into
* position changes of the underlying {@link RealRandomAccess}es.
* @param components
* a list of <em>n</em>-dimensional {@link RealRandomAccessible}s
* @return
*/
public static < T > RealRandomAccessible<Composite<T>> realComposite( final StackAccessMode stackAccessMode, final RealRandomAccessible< T >... components)
{
return new RealStackCompositeView<T>( components, stackAccessMode );
}

/**
* Form a {@link RealRandomAccessible} of {@link Composite}s from <em>n</em>
* {@link RealRandomAccessible}s.
*
* @param components
* a list of <em>n</em>-dimensional {@link RealRandomAccessible}s
* @return
*/
public static < T > RealRandomAccessible<Composite<T>> realComposite( final RealRandomAccessible< T >... components)
{
return new RealStackCompositeView<T>( components );
}

/**
* Positive shear transform of a RandomAccessible using
* {@link ShearTransform}, i.e. c[ shearDimension ] = c[ shearDimension ] +
Expand Down
Loading