*/
public static < T > MixedTransformView< T > hyperSlice( final RandomAccessible< T > view, final int d, final long pos )
{
final int m = view.numDimensions();
final int n = m - 1;
final MixedTransform t = new MixedTransform( n, m );
final long[] translation = new long[ m ];
translation[ d ] = pos;
final boolean[] zero = new boolean[ m ];
final int[] component = new int[ m ];
for ( int e = 0; e < m; ++e )
{
if ( e < d )
{
zero[ e ] = false;
component[ e ] = e;
}
else if ( e > d )
{
zero[ e ] = false;
component[ e ] = e - 1;
}
else
{
zero[ e ] = true;
component[ e ] = 0;
}
}
t.setTranslation( translation );
t.setComponentZero( zero );
t.setComponentMapping( component );
return new MixedTransformView< T >( view, t );
}