Class EnergyStackWithoutParameters
Object
EnergyStackWithoutParameters
A stack of channels used as context to calculate features (or calculating energy more
broadly).
The stack can have 0 channels, in which case, explicit dimensions must be set.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionEnergyStackWithoutParameters
(Channel channel) Create a energy-stack comprised of a single channelEnergyStackWithoutParameters
(Dimensions dimensions) Create a energy-stack with no channels - but with associated dimensions.Create a energy-stack comprised of all channels from a stack -
Method Summary
Modifier and TypeMethodDescriptionasStack()
Derive aStack
representation containing the identical channels to the current instance.The dimensions of all channels in the stack.extent()
The width and height and depth of allChannel
s in the stack.extractSlice
(int z) Extract a particular z-slice from theEnergyStackWithoutParameters
as a new stack.final Channel
getChannel
(int index) Returns the channel at a particular position in the stack.final int
The number of channels in the stack.
-
Constructor Details
-
EnergyStackWithoutParameters
Create a energy-stack comprised of a single channel- Parameters:
channel
-
-
EnergyStackWithoutParameters
Create a energy-stack comprised of all channels from a stack- Parameters:
stack
- the stack which is reused as the energy-stack (i.e. it is not duplicated)
-
EnergyStackWithoutParameters
Create a energy-stack with no channels - but with associated dimensions.- Parameters:
dimensions
- the dimensions.
-
-
Method Details
-
getNumberChannels
public final int getNumberChannels()The number of channels in the stack.- Returns:
- the number of channels.
-
dimensions
The dimensions of all channels in the stack.- Returns:
- the dimensions.
-
extent
The width and height and depth of allChannel
s in the stack.- Returns:
- the size, in three dimensions.
-
getChannel
Returns the channel at a particular position in the stack.- Parameters:
index
- the index (zero-indexed).- Returns:
- the respective channel.
- Throws:
IndexOutOfBoundsException
- if the index is out of range (index < 0 || index >= size()
)
-
asStack
Derive aStack
representation containing the identical channels to the current instance. -
extractSlice
Extract a particular z-slice from theEnergyStackWithoutParameters
as a new stack.- Parameters:
z
- the index in the Z-dimension of the slice to extract.- Returns:
- the extracted slice, as a new
EnergyStackWithoutParameters
but reusing the existing voxels. - Throws:
OperationFailedException
- if no channels exist in the energy-stack.
-