Class EnergyStack
Object
EnergyStack
A
EnergyStackWithoutParameters
with associated parameters in a Dictionary
.- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionEnergyStack
(EnergyStackWithoutParameters energyStack) Create from aEnergyStackWithoutParameters
without any additional parameters.EnergyStack
(EnergyStackWithoutParameters delegate, Dictionary parameters) Creates a newEnergyStack
instance.EnergyStack
(Channel channel) Create from a singleChannel
.EnergyStack
(Dimensions dimensions) Create a new stack ofDimensions
with zero-voxel values, without any additional parameters.EnergyStack
(Stack stack) Create from aEnergyStack
without any additional parameters.EnergyStack
(Stack stack, Dictionary dictionary) Create from aStack
with associated parameters in aDictionary
. -
Method Summary
Modifier and TypeMethodDescriptionasStack()
Derive aStack
representation containing the identical channels to the current instance.copyChangeDictionary
(Dictionary dictionaryToAssign) Makes a copy of theEnergyStack
but assigns a newDictionary
.The image-dimensions associated with the energy-stack.extent()
The width and height and depth of allChannel
s in the stack.extractSlice
(int z) Extract a particular z-slice from theEnergyStack
as a new stack.getChannel
(int index) Returns the channel at a particular position in the stack.final int
The number of channels in the stack.The associated parameters.boolean
Does exactly one z-slice exist in the energy stack?The image-resolution associated with the energy-stack.void
setParameters
(Dictionary parameters) The associated parameters.The energy-stack without associated parameters.
-
Constructor Details
-
EnergyStack
Create from a singleChannel
.- Parameters:
channel
- the channel.
-
EnergyStack
Create from aEnergyStackWithoutParameters
without any additional parameters.- Parameters:
energyStack
- the energy-stack.
-
EnergyStack
Create from aStack
with associated parameters in aDictionary
.- Parameters:
stack
- the stack.dictionary
- the associated parameters.
-
EnergyStack
Create from aEnergyStack
without any additional parameters.- Parameters:
stack
- the stack.
-
EnergyStack
Create a new stack ofDimensions
with zero-voxel values, without any additional parameters.- Parameters:
dimensions
- the dimensions.
-
EnergyStack
Creates a newEnergyStack
instance.- Parameters:
delegate
-parameters
- The associated parameters.
-
-
Method Details
-
extractSlice
Extract a particular z-slice from theEnergyStack
as a new stack.- Parameters:
z
- the index in the Z-dimension of the slice to extract.- Returns:
- the extracted slice, as a new
EnergyStack
but reusing the existing voxels. - Throws:
OperationFailedException
- if no channels exist in the energy-stack.
-
hasOneSlice
public boolean hasOneSlice()Does exactly one z-slice exist in the energy stack?- Returns:
- true iff the number of z-slices is 1.
-
dimensions
The image-dimensions associated with the energy-stack.- Returns:
- the image-dimensions.
-
resolution
The image-resolution associated with the energy-stack.- Returns:
- the image-resolution.
-
copyChangeDictionary
Makes a copy of theEnergyStack
but assigns a newDictionary
.- Parameters:
dictionaryToAssign
- the dictionary.- Returns:
- a copy of the existing instance, that is otherwise identical, but contains
dictionaryToAssign
.
-
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. -
extent
The width and height and depth of allChannel
s in the stack.- Returns:
- the size, in three dimensions.
-
withoutParameters
The energy-stack without associated parameters.- Returns:
- a representation of the energy-stack without parameters (not newly created).
-
getNumberChannels
public final int getNumberChannels()The number of channels in the stack.- Returns:
- the number of channels.
-
getParameters
The associated parameters. -
setParameters
The associated parameters.
-