Interface VoxelsArithmetic


public interface VoxelsArithmetic
Allows manipulation of voxel intensities via arithmetic operations.
Author:
Owen Feehan
  • Method Summary

    Modifier and Type Method Description
    void addTo​(ObjectMask object, int valueToBeAdded)
    Adds a constant-value to each voxel but only for voxels inside an object-mask.
    void divideBy​(int divisor)
    Divides the value of all voxels by a scalar constant.
    void multiplyBy​(double factor)
    Multiplies the value of all voxels by a factor.
    void multiplyBy​(ObjectMask object, double factor)
    Multiplies each voxel by constant factor but only for voxels inside an ObjectMask.
    void subtractFrom​(int valueToSubtractFrom)
    Subtracts all current voxel-values from a constant-value.
  • Method Details

    • addTo

      void addTo​(ObjectMask object, int valueToBeAdded)
      Adds a constant-value to each voxel but only for voxels inside an object-mask.
      Parameters:
      object - object-mask to restrict operation to certain voxels.
      valueToBeAdded - constant-value to be added.
    • multiplyBy

      void multiplyBy​(double factor)
      Multiplies the value of all voxels by a factor.
      Parameters:
      factor - what to multiply-by.
    • multiplyBy

      void multiplyBy​(ObjectMask object, double factor)
      Multiplies each voxel by constant factor but only for voxels inside an ObjectMask.
      Parameters:
      object - object-mask to restrict operation to certain voxels.
      factor - constant-value to multiply by.
    • divideBy

      void divideBy​(int divisor)
      Divides the value of all voxels by a scalar constant.
      Parameters:
      divisor - what to divide-by.
    • subtractFrom

      void subtractFrom​(int valueToSubtractFrom)
      Subtracts all current voxel-values from a constant-value.

      i.e. each voxel value v is updated to become valueToSubtractFrom - v

      Parameters:
      valueToSubtractFrom - the value to subtract from.