Package icyllis.arc3d.core

# Class ColorSpace.Rgb.TransferParameters

java.lang.Object
icyllis.arc3d.core.ColorSpace.Rgb.TransferParameters

Enclosing class:
  `ColorSpace.Rgb`

public static class ColorSpace.Rgb.TransferParameters extends Object

Defines the parameters for the ICC parametric curve type 4, as defined in ICC.1:2004-10, section 10.15.

The EOTF is of the form:

\(\begin{equation} Y = \begin{cases}c X + f invalid input: '&' X \lt d \\\ \left( a X + b \right) ^{g} + e invalid input: '&' X \ge d \end{cases} \end{equation}\)

The corresponding OETF is simply the inverse function.

The parameters defined by this class form a valid transfer function only if all the following conditions are met:

- No parameter is a `Not-a-Number`
- \(d\) is in the range \([0..1]\)
- The function is not constant
- The function is positive and increasing

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final double`
  `a`
  Variable \(a\) in the equation of the EOTF described above.
  `final double`
  `b`
  Variable \(b\) in the equation of the EOTF described above.
  `final double`
  `c`
  Variable \(c\) in the equation of the EOTF described above.
  `final double`
  `d`
  Variable \(d\) in the equation of the EOTF described above.
  `final double`
  `e`
  Variable \(e\) in the equation of the EOTF described above.
  `final double`
  `f`
  Variable \(f\) in the equation of the EOTF described above.
  `final double`
  `g`
  Variable \(g\) in the equation of the EOTF described above.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TransferParameters(double a, double b, double c, double d, double g)`
  Defines the parameters for the ICC parametric curve type 3, as defined in ICC.1:2004-10, section 10.15.
  `TransferParameters(double a, double b, double c, double d, double e, double f, double g)`
  Defines the parameters for the ICC parametric curve type 4, as defined in ICC.1:2004-10, section 10.15.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `int`
  `hashCode()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### a

    public final double a
    Variable \(a\) in the equation of the EOTF described above.

  - ### b

    public final double b
    Variable \(b\) in the equation of the EOTF described above.

  - ### c

    public final double c
    Variable \(c\) in the equation of the EOTF described above.

  - ### d

    public final double d
    Variable \(d\) in the equation of the EOTF described above.

  - ### e

    public final double e
    Variable \(e\) in the equation of the EOTF described above.

  - ### f

    public final double f
    Variable \(f\) in the equation of the EOTF described above.

  - ### g

    public final double g
    Variable \(g\) in the equation of the EOTF described above.

- ## Constructor Details

  - ### TransferParameters

    public TransferParameters(double a, double b, double c, double d, double g)

    Defines the parameters for the ICC parametric curve type 3, as defined in ICC.1:2004-10, section 10.15.

    The EOTF is of the form:

    \(\begin{equation} Y = \begin{cases}c X invalid input: '&' X \lt d \\\ \left( a X + b \right) ^{g} invalid input: '&' X \ge d \end{cases} \end{equation}\)

    This constructor is equivalent to setting \(e\) and \(f\) to 0.

    Parameters:
      `a` - The value of \(a\) in the equation of the EOTF described above
      `b` - The value of \(b\) in the equation of the EOTF described above
      `c` - The value of \(c\) in the equation of the EOTF described above
      `d` - The value of \(d\) in the equation of the EOTF described above
      `g` - The value of \(g\) in the equation of the EOTF described above
    Throws:
      `IllegalArgumentException` - If the parameters form an invalid transfer function

  - ### TransferParameters

    public TransferParameters(double a, double b, double c, double d, double e, double f, double g)

    Defines the parameters for the ICC parametric curve type 4, as defined in ICC.1:2004-10, section 10.15.

    Parameters:
      `a` - The value of \(a\) in the equation of the EOTF described above
      `b` - The value of \(b\) in the equation of the EOTF described above
      `c` - The value of \(c\) in the equation of the EOTF described above
      `d` - The value of \(d\) in the equation of the EOTF described above
      `e` - The value of \(e\) in the equation of the EOTF described above
      `f` - The value of \(f\) in the equation of the EOTF described above
      `g` - The value of \(g\) in the equation of the EOTF described above
    Throws:
      `IllegalArgumentException` - If the parameters form an invalid transfer function

- ## Method Details

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`