Class EnergyStack
Object
org.anchoranalysis.feature.energy.EnergyStack
public class EnergyStack extends Object
A
EnergyStackWithoutParameters with associated parameters in a Dictionary.- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description EnergyStack(EnergyStackWithoutParameters energyStack)Create from aEnergyStackWithoutParameterswithout any additional parameters.EnergyStack(EnergyStackWithoutParameters delegate, Dictionary parameters)EnergyStack(Channel channel)Create from a singleChannel.EnergyStack(Dimensions dimensions)Create a new stack ofDimensionswith zero-voxel values, without any additional parameters.EnergyStack(Stack stack)Create from aEnergyStackwithout any additional parameters.EnergyStack(Stack stack, Dictionary dictionary)Create from aStackwith associated parameters in aDictionary. -
Method Summary
Modifier and Type Method Description StackasStack()Derive aStackrepresentation containing the identical channels to the current instance.EnergyStackcopyChangeDictionary(Dictionary dictionaryToAssign)Makes a copy of theEnergyStackbut assigns a newDictionary.Dimensionsdimensions()The image-dimensions associated with the energy-stack.org.anchoranalysis.spatial.box.Extentextent()The width and height and depth of allChannels in the stack.EnergyStackextractSlice(int z)Extract a particular z-slice from theEnergyStackas a new stack.ChannelgetChannel(int index)Returns the channel at a particular position in the stack.intgetNumberChannels()The number of channels in the stack.DictionarygetParameters()The associated parameters.booleanhasOneSlice()Does exactly one z-slice exist in the energy stack?Optional<Resolution>resolution()The image-resolution associated with the energy-stack.voidsetParameters(Dictionary parameters)The associated parameters.EnergyStackWithoutParameterswithoutParameters()The energy-stack without associated parameters.
-
Constructor Details
-
EnergyStack
Create from a singleChannel.- Parameters:
channel- the channel.
-
EnergyStack
Create from aEnergyStackWithoutParameterswithout any additional parameters.- Parameters:
energyStack- the energy-stack.
-
EnergyStack
Create from aStackwith associated parameters in aDictionary.- Parameters:
stack- the stack.dictionary- the associated parameters.
-
EnergyStack
Create from aEnergyStackwithout any additional parameters.- Parameters:
stack- the stack.
-
EnergyStack
Create a new stack ofDimensionswith zero-voxel values, without any additional parameters.- Parameters:
dimensions- the dimensions.
-
EnergyStack
-
-
Method Details
-
extractSlice
Extract a particular z-slice from theEnergyStackas a new stack.- Parameters:
z- the index in the Z-dimension of the slice to extract.- Returns:
- the extracted slice, as a new
EnergyStackbut 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 theEnergyStackbut 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 aStackrepresentation containing the identical channels to the current instance. -
extent
public org.anchoranalysis.spatial.box.Extent extent()The width and height and depth of allChannels 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.
-