Class EnergyStack
Object
EnergyStack
A
EnergyStackWithoutParameters with associated parameters in a Dictionary.- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionEnergyStack(EnergyStackWithoutParameters energyStack) Create from aEnergyStackWithoutParameterswithout any additional parameters.EnergyStack(EnergyStackWithoutParameters delegate, Dictionary parameters) Creates a newEnergyStackinstance.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 TypeMethodDescriptionasStack()Derive aStackrepresentation containing the identical channels to the current instance.copyChangeDictionary(Dictionary dictionaryToAssign) Makes a copy of theEnergyStackbut assigns a newDictionary.The image-dimensions associated with the energy-stack.extent()The width and height and depth of allChannels in the stack.extractSlice(int z) Extract a particular z-slice from theEnergyStackas a new stack.getChannel(int index) Returns the channel at a particular position in the stack.final intThe number of channels in the stack.The associated parameters.booleanDoes exactly one z-slice exist in the energy stack?The image-resolution associated with the energy-stack.voidsetParameters(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 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
Creates a newEnergyStackinstance.- Parameters:
delegate-parameters- The associated parameters.
-
-
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
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.
-