Class EnergyStackWithoutParameters

Object
EnergyStackWithoutParameters

public class EnergyStackWithoutParameters extends Object
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 Details

    • EnergyStackWithoutParameters

      public EnergyStackWithoutParameters(Channel channel)
      Create a energy-stack comprised of a single channel
      Parameters:
      channel -
    • EnergyStackWithoutParameters

      public EnergyStackWithoutParameters(Stack stack)
      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

      public EnergyStackWithoutParameters(Dimensions dimensions)
      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

      public Dimensions dimensions()
      The dimensions of all channels in the stack.
      Returns:
      the dimensions.
    • extent

      public Extent extent()
      The width and height and depth of all Channels in the stack.
      Returns:
      the size, in three dimensions.
    • getChannel

      public final Channel getChannel(int index)
      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

      public Stack asStack()
      Derive a Stack representation containing the identical channels to the current instance.
      Returns:
      a newly created Stack, but reusing the current Channels.
    • extractSlice

      public EnergyStackWithoutParameters extractSlice(int z) throws OperationFailedException
      Extract a particular z-slice from the EnergyStackWithoutParameters 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.