Constructor and Description |
---|
Stack() |
Stack(boolean rgb) |
Stack(boolean rgb,
Channel... channels) |
Stack(boolean rgb,
java.util.stream.Stream<Channel> channelStream) |
Stack(Channel channel) |
Stack(Dimensions dimensions,
ChannelFactorySingleType factory,
int numberChannels,
boolean rgb) |
Stack(java.util.stream.Stream<Channel> channelStream) |
Modifier and Type | Method and Description |
---|---|
void |
addBlankChannel() |
void |
addChannel(Channel channel) |
void |
addChannelsFrom(Stack stack) |
boolean |
allChannelsHaveIdenticalType()
Determines if all channels have an identical voxel data-type.
|
boolean |
allChannelsHaveType(VoxelDataType channelDataType)
Determines if all channels have a specific data-type.
|
List<Channel> |
asListChannels() |
Dimensions |
dimensions() |
Stack |
duplicateDeep()
Performs a deep copy of the stack, so that all channels are duplicated.
|
Stack |
duplicateShallow()
Performs a shallow copy of the stack, so that all channels are reused.
|
boolean |
equals(Object obj) |
boolean |
equalsDeep(Stack other,
boolean compareResolution)
Are the two stack equal using a deep voxel by voxel comparison of each channel?
|
Extent |
extent() |
Stack |
extractSlice(int z) |
Stack |
extractUpToThreeChannels() |
Channel |
getChannel(int index) |
int |
getNumberChannels() |
int |
hashCode() |
boolean |
hasMoreThanOneSlice()
Does the stack have more than one slice in the z-dimension?
|
boolean |
isRGB()
If true, and the stack has exactly three channels, this stack can be interpreted as a RGB
image.
|
Iterator<Channel> |
iterator() |
Stack |
mapChannel(CheckedUnaryOperator<Channel,OperationFailedException> mapping)
Produces a new stack with a particular mapping applied to each channel.
|
Stack |
mapChannelWithIndex(CheckedBiFunction<Channel,Integer,Channel,OperationFailedException> mapping)
Produces a new stack with a particular mapping applied to each channel (with an index of the
channel also available)
|
Stack |
projectMax()
Creates a Maximum
Intensity Projection of each channel.
|
Optional<Resolution> |
resolution() |
void |
updateResolution(Resolution resolution) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public Stack(boolean rgb)
public Stack()
public Stack(Channel channel)
public Stack(Dimensions dimensions, ChannelFactorySingleType factory, int numberChannels, boolean rgb)
public Stack(boolean rgb, Channel... channels) throws IncorrectImageSizeException
IncorrectImageSizeException
public Stack(java.util.stream.Stream<Channel> channelStream) throws IncorrectImageSizeException
IncorrectImageSizeException
public Stack(boolean rgb, java.util.stream.Stream<Channel> channelStream) throws IncorrectImageSizeException
IncorrectImageSizeException
public Stack mapChannel(CheckedUnaryOperator<Channel,OperationFailedException> mapping) throws OperationFailedException
The function applied to the channel should ensure it produces uniform sizes.
mapping
- performs an operation on a channel and produces a modified channel (or a
different one entirely)mapping
) preserving the channel orderOperationFailedException
- if the channels produced have non-uniform sizespublic Stack mapChannelWithIndex(CheckedBiFunction<Channel,Integer,Channel,OperationFailedException> mapping) throws OperationFailedException
The function applied to the channel should ensure it produces uniform sizes.
mapping
- performs an operation on a channel and produces a modified channel (or a
different one entirely)mapping
) preserving the channel orderOperationFailedException
- if the channels produced have non-uniform sizespublic Stack extractSlice(int z)
public Stack projectMax()
Note that if the channels do not need projections, the existing Channel
is reused
in the newly created Stack
. But if a projection is needed, it is always freshly
created as a new channel.
public void addBlankChannel() throws OperationFailedException
OperationFailedException
public final void addChannel(Channel channel) throws IncorrectImageSizeException
IncorrectImageSizeException
public final void addChannelsFrom(Stack stack) throws IncorrectImageSizeException
IncorrectImageSizeException
public final Channel getChannel(int index)
public final int getNumberChannels()
public Dimensions dimensions()
public Optional<Resolution> resolution()
public Extent extent()
public Stack duplicateDeep()
public Stack duplicateShallow()
public Stack extractUpToThreeChannels()
public boolean hasMoreThanOneSlice()
public boolean allChannelsHaveIdenticalType()
public boolean allChannelsHaveType(VoxelDataType channelDataType)
channelDataType
- the specific data-typechannelDataType
as their voxel data-type.public boolean equalsDeep(Stack other, boolean compareResolution)
other
- the stack to compare withcompareResolution
- if true, the image-resolution is also compared for each channel.public void updateResolution(Resolution resolution)
public boolean isRGB()
This is an important flag for determining how a stack is displayed visually, determining whether a stack is portrayed as a color image or composite grayscale channels.
Copyright © 2010–2021 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.