Class HistogramFromObjectsFactory

Object
HistogramFromObjectsFactory

public class HistogramFromObjectsFactory extends Object
Create a Histogram of the voxel intensity values in an image, pertaining to a region defined by a ObjectMask or a Mask.
Author:
Owen Feehan
  • Method Details

    • createFrom

      public static Histogram createFrom(VoxelsUntyped voxels, Optional<ObjectMask> object)
      Creates a Histogram of voxel intensity values in voxels, all or only those in object.
      Parameters:
      voxels - the intensity values for the entire scene.
      object - if defined, only intensity values corresponding to this object are retrieved, otherwise all voxels.
      Returns:
      a newly created Histogram.
    • createFrom

      public static Histogram createFrom(Channel channel, ObjectMask object)
      Creates a Histogram of voxel intensity values in channel corresponding to object.
      Parameters:
      channel - the channel with voxels.
      object - only intensity values corresponding to this object are retrieved.
      Returns:
      a newly created Histogram.
    • createFrom

      public static Histogram createFrom(Channel channel, ObjectCollection objects)
      Creates a Histogram of voxel intensity values in channel corresponding to objects.
      Parameters:
      channel - the channel with voxels.
      objects - only intensity values corresponding to objects are retrieved.
      Returns:
      a newly created Histogram.
    • createFrom

      public static Histogram createFrom(Channel channel, Optional<Mask> mask) throws CreateException
      Creates a Histogram of all voxel intensity values in channel, or only those in mask if it is dfined.
      Parameters:
      channel - the channel with voxels.
      mask - an optional mask, that restricts which voxels are considered.
      Returns:
      a newly created Histogram.
      Throws:
      CreateException - if the size of the channel and mask do not match, or a histogram cannot otherwise created.
    • createFrom

      public static Histogram createFrom(Channel channel, Mask mask) throws CreateException
      Creates a Histogram of all voxel intensity values in channel corresponding to Mask.
      Parameters:
      channel - the channel with voxels.
      mask - the mask.
      Returns:
      a newly created Histogram.
      Throws:
      CreateException - if the size of the channel and mask do not match, or a histogram cannot otherwise created.